Fix gdk livelock on Windows when compiled with recent mingw/gcc

recent gcc (>=11) sets _WIN32_WINNT >= 0x602 which changes
QS_ALLINPUT to include (QS_TOUCH | QS_POINTER) events which are
only available on Windows 8 and later. Listening to those events
makes ardour unresponsive.
This commit is contained in:
Robin Gareus 2024-01-28 21:51:57 +01:00
parent 7946e442d3
commit ddbe15fd03
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -86,6 +86,8 @@
#define SYNAPSIS_ICON_WINDOW_CLASS "SynTrackCursorWindowClass"
#define QS_YDK_RELEVANT_INPUT 0x4ff // = QS_KEY | QS_MOUSEMOVE | QS_MOUSEBUTTON | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE | QS_RAWINPUT
static gboolean gdk_event_translate (MSG *msg,
gint *ret_valp);
static void handle_wm_paint (MSG *msg,
@ -382,7 +384,7 @@ gdk_events_pending (void)
{
return (_gdk_event_queue_find_first (_gdk_display) ||
(modal_win32_dialog == NULL &&
GetQueueStatus (QS_ALLINPUT) != 0));
GetQueueStatus (QS_YDK_RELEVANT_INPUT) != 0));
}
GdkEvent*
@ -3653,7 +3655,7 @@ gdk_event_prepare (GSource *source,
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
(modal_win32_dialog == NULL &&
GetQueueStatus (QS_ALLINPUT) != 0));
GetQueueStatus (QS_YDK_RELEVANT_INPUT) != 0));
GDK_THREADS_LEAVE ();
@ -3671,7 +3673,7 @@ gdk_event_check (GSource *source)
{
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
(modal_win32_dialog == NULL &&
GetQueueStatus (QS_ALLINPUT) != 0));
GetQueueStatus (QS_YDK_RELEVANT_INPUT) != 0));
}
else
{