win32: only wait for the input types GDK handles
Programs built with newer headers spun on Windows 8 or missed events on XP and 7. Taken from Ardour's YTK: - ddbe15fd (Robin Gareus)
This commit is contained in:
parent
de123d8ed5
commit
d82c6516ae
1 changed files with 10 additions and 3 deletions
|
|
@ -87,6 +87,13 @@
|
|||
|
||||
#define SYNAPSIS_ICON_WINDOW_CLASS "SynTrackCursorWindowClass"
|
||||
|
||||
/* The input GDK waits for. Headers for Windows 8 and later add touch
|
||||
* and pointer messages to QS_ALLINPUT: with those GDK keeps waking up
|
||||
* for messages it does not take from the queue, and Windows 7 and
|
||||
* earlier refuse the unknown flags and report nothing at all. */
|
||||
#define GDK_QS_INPUT (QS_KEY | QS_MOUSEMOVE | QS_MOUSEBUTTON | QS_POSTMESSAGE | \
|
||||
QS_TIMER | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE | 0x0400 /* QS_RAWINPUT */)
|
||||
|
||||
static gboolean gdk_event_translate (MSG *msg,
|
||||
gint *ret_valp);
|
||||
static void handle_wm_paint (MSG *msg,
|
||||
|
|
@ -385,7 +392,7 @@ gdk_events_pending (void)
|
|||
{
|
||||
return (_gdk_event_queue_find_first (_gdk_display) ||
|
||||
(modal_win32_dialog == NULL &&
|
||||
GetQueueStatus (QS_ALLINPUT) != 0));
|
||||
GetQueueStatus (GDK_QS_INPUT) != 0));
|
||||
}
|
||||
|
||||
GdkEvent*
|
||||
|
|
@ -3667,7 +3674,7 @@ gdk_event_prepare (GSource *source,
|
|||
|
||||
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
|
||||
(modal_win32_dialog == NULL &&
|
||||
GetQueueStatus (QS_ALLINPUT) != 0));
|
||||
GetQueueStatus (GDK_QS_INPUT) != 0));
|
||||
|
||||
GDK_THREADS_LEAVE ();
|
||||
|
||||
|
|
@ -3685,7 +3692,7 @@ gdk_event_check (GSource *source)
|
|||
{
|
||||
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
|
||||
(modal_win32_dialog == NULL &&
|
||||
GetQueueStatus (QS_ALLINPUT) != 0));
|
||||
GetQueueStatus (GDK_QS_INPUT) != 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue