]> git.saurik.com Git - wxWidgets.git/commitdiff
Reset the mouse event object and id in case FindWindowForMouseEvent
authorRobin Dunn <robin@alldunn.com>
Thu, 27 Apr 2006 00:30:59 +0000 (00:30 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 27 Apr 2006 00:30:59 +0000 (00:30 +0000)
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

src/gtk/window.cpp

index 230cf90c468473bd180257b94f6a2ab07c18c1a5..ebef3383a3a6e74a11eadd940cb639f2731655bd 100644 (file)
@@ -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 )