From: Robin Dunn Date: Thu, 27 Apr 2006 00:30:59 +0000 (+0000) Subject: Reset the mouse event object and id in case FindWindowForMouseEvent X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ccb9fa0dfb1acc890ae3164c16355a216563d870 Reset the mouse event object and id in case FindWindowForMouseEvent selected a new window to send the event to. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 230cf90c46..ebef3383a3 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1591,6 +1591,10 @@ gtk_window_button_press_callback( GtkWidget *widget, if ( !g_captureWindow ) win = FindWindowForMouseEvent(win, event.m_x, event.m_y); + // reset the event object and id in case win changed. + event.SetEventObject( win ); + event.SetId( win->GetId() ); + if (win->GetEventHandler()->ProcessEvent( event )) { g_signal_stop_emission_by_name (widget, "button_press_event"); @@ -1671,6 +1675,10 @@ gtk_window_button_release_callback( GtkWidget *widget, if ( !g_captureWindow ) win = FindWindowForMouseEvent(win, event.m_x, event.m_y); + // reset the event object and id in case win changed. + event.SetEventObject( win ); + event.SetId( win->GetId() ); + if (win->GetEventHandler()->ProcessEvent( event )) { g_signal_stop_emission_by_name (widget, "button_release_event"); @@ -1746,6 +1754,10 @@ gtk_window_motion_notify_callback( GtkWidget *widget, else // no capture { win = FindWindowForMouseEvent(win, event.m_x, event.m_y); + + // reset the event object and id in case win changed. + event.SetEventObject( win ); + event.SetId( win->GetId() ); } if ( !g_captureWindow )