X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/807a572ef49c4925cdebca6d57b88b9487ce8b41..7212d15556e87f73ff5ea8c3211a0e8e8811426b:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 616ac2f836..11567f27fb 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3019,9 +3019,7 @@ void wxWindowGTK::DoGetClientSize( int *width, int *height ) const int dh = 0; if (m_hasScrolling) - { GetScrollbarWidth(m_widget, dw, dh); - } #ifndef __WXUNIVERSAL__ if (HasFlag(wxRAISED_BORDER) || HasFlag(wxSUNKEN_BORDER)) @@ -3841,16 +3839,18 @@ void wxWindowGTK::GtkSendPaintEvents() // Clip to paint region in wxClientDC m_clipPaintRegion = true; -#if 0 + m_nativeUpdateRegion = m_updateRegion; + if (GetLayoutDirection() == wxLayout_RightToLeft) { - maybe_rtl_region.Clear(); + // Transform m_updateRegion under RTL + m_updateRegion.Clear(); gint width; gdk_window_get_geometry( GTK_PIZZA(m_wxwindow)->bin_window, NULL, NULL, &width, NULL, NULL ); - wxRegionIterator upd( m_updateRegion ); + wxRegionIterator upd( m_nativeUpdateRegion ); while (upd) { wxRect rect; @@ -3860,12 +3860,11 @@ void wxWindowGTK::GtkSendPaintEvents() rect.height = upd.GetHeight(); rect.x = width - rect.x - rect.width; - maybe_rtl_region.Union( rect ); + m_updateRegion.Union( rect ); ++upd; } } -#endif // widget to draw on GtkPizza *pizza = GTK_PIZZA (m_wxwindow); @@ -3879,7 +3878,7 @@ void wxWindowGTK::GtkSendPaintEvents() if (GTK_WIDGET_MAPPED(parent->m_widget)) { - wxRegionIterator upd( m_updateRegion ); + wxRegionIterator upd( m_nativeUpdateRegion ); while (upd) { GdkRectangle rect; @@ -3923,6 +3922,7 @@ void wxWindowGTK::GtkSendPaintEvents() m_clipPaintRegion = false; m_updateRegion.Clear(); + m_nativeUpdateRegion.Clear(); } void wxWindowGTK::SetDoubleBuffered( bool on ) @@ -3933,6 +3933,11 @@ void wxWindowGTK::SetDoubleBuffered( bool on ) gtk_widget_set_double_buffered( m_wxwindow, on ); } +bool wxWindowGTK::IsDoubleBuffered() const +{ + return GTK_WIDGET_DOUBLE_BUFFERED( m_wxwindow ); +} + void wxWindowGTK::ClearBackground() { wxCHECK_RET( m_widget != NULL, wxT("invalid window") );