From: Robert Roebling Date: Thu, 24 Apr 2003 17:41:10 +0000 (+0000) Subject: Another attempt to fix the freeze while mouse capturing. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/50382578c16dce3450ba6491afd19e10a1e7515f Another attempt to fix the freeze while mouse capturing. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 2a4c1375d1..2a66dac87f 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1831,10 +1831,14 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, wxMouseEvent event( wxEVT_MOTION ); InitMouseEvent(win, event, gdk_event); - if ( !g_captureWindow ) + if ( g_captureWindow ) { // synthetize a mouse enter or leave event if needed GdkWindow *winUnderMouse = gdk_window_at_pointer(NULL, NULL); + // This seems to be necessary and actually been added to + // GDK itself in version 2.0.X + gdk_flush(); + bool hasMouse = winUnderMouse == gdk_event->window; if ( hasMouse != g_captureWindowHasMouse ) { diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 2a4c1375d1..2a66dac87f 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -1831,10 +1831,14 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, wxMouseEvent event( wxEVT_MOTION ); InitMouseEvent(win, event, gdk_event); - if ( !g_captureWindow ) + if ( g_captureWindow ) { // synthetize a mouse enter or leave event if needed GdkWindow *winUnderMouse = gdk_window_at_pointer(NULL, NULL); + // This seems to be necessary and actually been added to + // GDK itself in version 2.0.X + gdk_flush(); + bool hasMouse = winUnderMouse == gdk_event->window; if ( hasMouse != g_captureWindowHasMouse ) {