X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4adb6d28f77c4cb6f8076b9853f5b426299a4dfc..96991c58ed3af415f83cd780d2875b8f0b2255d1:/src/gtk1/window.cpp diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 558f67a699..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 ); @@ -3941,6 +3943,12 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect ) void wxWindowGTK::Update() { GtkUpdate(); + + // when we call Update() we really want to update the window immediately on + // screen, even if itmeans flushing the entire queue and hence slowing down + // everything -- but it should still be done, it's just that Update() should + // be called very rarely + gdk_flush(); } void wxWindowGTK::GtkUpdate() @@ -3971,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;