]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
Missing header.
[wxWidgets.git] / src / gtk1 / window.cpp
index a55d32a3ad1cecaf558d0d4a0b14b472088ba483..dbc991b9b21a00ef8195976cf49a809829ebfde7 100644 (file)
@@ -1000,6 +1000,8 @@ static void wxFillOtherKeyEventFields(wxKeyEvent& event,
 #if wxUSE_UNICODE
     event.m_uniChar = gdk_keyval_to_unicode(gdk_event->keyval);
 #endif
+    wxGetMousePosition( &x, &y );
+    win->ScreenToClient( &x, &y );
     event.m_x = x;
     event.m_y = y;
     event.SetEventObject( win );
@@ -3980,9 +3982,7 @@ void wxWindowGTK::GtkSendPaintEvents()
     if (GetThemeEnabled() && (GetBackgroundStyle() == wxBG_STYLE_SYSTEM))
     {
         // find ancestor from which to steal background
-        wxWindow *parent = IsTopLevel() ? this : GetParent();
-        while (parent && !parent->IsTopLevel())
-            parent = parent->GetParent();
+        wxWindow *parent = wxGetTopLevelParent((wxWindow *)this);
         if (!parent)
             parent = (wxWindow*)this;