X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aac97549ab6be4d2a4bf49a1a7c781d648304eff..249b31b53b6a91bbd2c9f4e2b56355753f6525c9:/src/gtk1/window.cpp diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index a55d32a3ad..dbc991b9b2 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -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;