Another try to fix the enter/leave freeze while in capture.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2003-04-24 17:39:45 +00:00
parent 85aa152733
commit 4115304e1f
2 changed files with 10 additions and 2 deletions

View File

@@ -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 )
{

View File

@@ -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 )
{