X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b965a9cfbf43c70d133ff268e70f393d8679637..7b0d5c59ebe9299ee312f4f1adb48189137575e1:/src/gtk1/window.cpp diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index f828018064..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 ); @@ -3977,12 +3979,10 @@ void wxWindowGTK::GtkSendPaintEvents() // widget to draw on GtkPizza *pizza = GTK_PIZZA (m_wxwindow); - if (GetThemeEnabled() && (GetBackgroundStyle() == wxBG_STYLE_SYSTEM) && !IsTopLevel()) + if (GetThemeEnabled() && (GetBackgroundStyle() == wxBG_STYLE_SYSTEM)) { // find ancestor from which to steal background - wxWindow *parent = GetParent(); - while (parent && !parent->IsTopLevel()) - parent = parent->GetParent(); + wxWindow *parent = wxGetTopLevelParent((wxWindow *)this); if (!parent) parent = (wxWindow*)this;