gtk/gdk/win32
Jeremy Tan a5c8fedf47 GDK W32: Always process all available messages
The GLib main loop blocks on MsgWaitForMultipleObjectsEx to
determine if there are any incoming messages while also allowing
for background tasks to run. If all available messages are not
processed after MsgWaitForMultipleObjectsEx has signaled that
there are available, CPU usage will skyrocket.

From my limited understanding (by inspection of profiling
under Visual Studio):
Key is pressed - MsgWaitForMultipleObjectsEx unblocks, and
sends message to GDK's event handler. Some event is now queued.

g_poll unblocks, calls the g_event_dispatch which finally
resolves to gdk_event_dispatch. This then calls
_gdk_win32_display_queue_events, but since a message is already
queued, it fails to call PeekMessage and returns immediately.

At the next iteration, g_poll again calls MsgWaitForMultipleObjectsEx
which queues yet another event and returns almost immediately, since
there are events available which haven't been processed by PeekMessage.

The dispatch function is then called and the process repeats.

https://bugzilla.gnome.org/show_bug.cgi?id=771568
2016-09-19 12:36:51 +00:00
..
rc Update GTK+ Windows icon (now scles up to 256x256) 2016-08-19 23:55:19 -04:00
bdfcursor.c
cursor.bdf
gdkcursor-win32.c win32: Make cursor code work without _gdk_display 2016-02-11 03:44:47 +01:00
gdkdevice-virtual.c win32: fix "unused variable" warning 2016-03-05 20:31:10 +01:00
gdkdevice-virtual.h
gdkdevice-win32.c win32 device: reorganize code to avoid prototypes 2016-01-23 14:43:50 +01:00
gdkdevice-win32.h W32: avoid code duplication in gdkdevice-win32|virtual 2015-12-22 09:31:56 +01:00
gdkdevice-wintab.c wintab: reorganize code to avoid prototypes 2016-01-23 14:43:47 +01:00
gdkdevice-wintab.h
gdkdevicemanager-win32.c win32: init wintab when the device manager is constructed 2016-02-29 18:25:01 +01:00
gdkdevicemanager-win32.h win32: Stop using _gdk_display global in device code 2016-02-11 03:44:47 +01:00
gdkdisplay-win32.c win32: Port to new monitor api 2016-04-27 23:18:16 -04:00
gdkdisplay-win32.h win32: Port to new monitor api 2016-04-27 23:18:16 -04:00
gdkdisplaymanager-win32.c
gdkdnd-win32.c gdk/dnd: Don't use default display when getting cursor 2016-04-26 23:03:24 +08:00
gdkevents-win32.c GDK W32: Always process all available messages 2016-09-19 12:36:51 +00:00
gdkgeometry-win32.c win32 geometry: reorganize code to avoid prototypes 2016-01-23 14:43:57 +01:00
gdkglcontext-win32.c GDK-Win32: Make update_stye_bits() available within the backend 2016-03-08 13:26:59 +08:00
gdkglcontext-win32.h
gdkglobals-win32.c Win32: fold the gdkinput.c file in gdkdisplay-win32.c 2016-02-22 21:45:08 +01:00
gdkkeys-win32.c GDK W32: Remove obsolete assertions 2016-08-26 20:46:27 +00:00
gdkmain-win32.c GDK W32: Cache multiple keyboard layouts simultaneously 2016-08-04 16:37:18 +00:00
gdkmonitor-win32.c gdk/win32/gdkmonitor-win32.c: Fix build on non-GCC 2016-05-09 13:14:01 +08:00
gdkmonitor-win32.h win32: Port to new monitor api 2016-04-27 23:18:16 -04:00
gdkprivate-win32.h GDK W32: Cache multiple keyboard layouts simultaneously 2016-08-04 16:37:18 +00:00
gdkproperty-win32.c GDK W32: Optimize clipboard handling a bit 2016-03-26 00:03:50 +00:00
gdkscreen-win32.c win32: Port to new monitor api 2016-04-27 23:18:16 -04:00
gdkselection-win32.c GDK W32: Optimize clipboard handling a bit 2016-03-26 00:03:50 +00:00
gdktestutils-win32.c
gdkwin32.h win32: Port to new monitor api 2016-04-27 23:18:16 -04:00
gdkwin32cursor.h
gdkwin32display.h win32: use the same parameter name as the implementation 2015-10-08 18:07:49 +02:00
gdkwin32displaymanager.h
gdkwin32dnd.h
gdkwin32glcontext.h
gdkwin32id.c
gdkwin32keys.h W32: Prefer the deadkey combinations that the OS uses 2016-08-04 16:37:19 +00:00
gdkwin32misc.h
gdkwin32monitor.h win32: Port to new monitor api 2016-04-27 23:18:16 -04:00
gdkwin32screen.h
gdkwin32window.h
gdkwindow-win32.c GDK W32: Fix dragging AeroSnap application 2016-06-05 09:00:40 +00:00
gdkwindow-win32.h GDK W32: Support UTF-16 surrogate pairs passed via VK_PACKET 2016-07-28 15:55:11 +00:00
libwntab32x.la
Makefile.am Opt in to structured logging 2016-07-22 23:13:20 -04:00
makefile.msc win32: move gdkvisual code in gdkscreen 2016-02-28 11:37:38 +01:00
pktdef.h
wintab.h
xcursors.h