]> git.saurik.com Git - wxWidgets.git/commitdiff
avoid sending mouse events to the wrong window, fixes #2917
authorPaul Cornett <paulcor@bullseye.com>
Wed, 15 Feb 2012 07:04:42 +0000 (07:04 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Wed, 15 Feb 2012 07:04:42 +0000 (07:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index 2e4d4da718d8df97d667e3e0280aa8b77a2325de..4a3b0068cb1362567fef0675da6bd96aec95cb05 100644 (file)
@@ -1141,7 +1141,7 @@ static void AdjustEventButtonState(wxMouseEvent& event)
     }
 }
 
-// find the window to send the mouse event too
+// find the window to send the mouse event to
 static
 wxWindowGTK *FindWindowForMouseEvent(wxWindowGTK *win, wxCoord& x, wxCoord& y)
 {
@@ -1191,6 +1191,8 @@ wxWindowGTK *FindWindowForMouseEvent(wxWindowGTK *win, wxCoord& x, wxCoord& y)
         else
         {
             if ((child->m_wxwindow == NULL) &&
+                !gtk_widget_get_has_window(child->m_widget) &&
+                win->IsClientAreaChild(child) &&
                 (child->m_x <= xx) &&
                 (child->m_y <= yy) &&
                 (child->m_x+child->m_width  >= xx) &&