X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/807a572ef49c4925cdebca6d57b88b9487ce8b41..5b20646ea86013b498bbb2a92387f889631cb3d9:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 616ac2f836..5ed6e3a754 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -28,6 +28,7 @@ #include "wx/settings.h" #include "wx/msgdlg.h" #include "wx/textctrl.h" + #include "wx/radiobut.h" #include "wx/toolbar.h" #include "wx/combobox.h" #include "wx/layout.h" @@ -3019,9 +3020,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)) @@ -3375,6 +3374,12 @@ void wxWindowGTK::SetFocus() { if (GTK_IS_CONTAINER(m_widget)) { + if (IsKindOf(CLASSINFO(wxRadioButton))) + { + gtk_widget_grab_focus (m_widget); + return; + } + gtk_widget_child_focus( m_widget, GTK_DIR_TAB_FORWARD ); } else @@ -3841,16 +3846,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 +3867,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 +3885,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 +3929,7 @@ void wxWindowGTK::GtkSendPaintEvents() m_clipPaintRegion = false; m_updateRegion.Clear(); + m_nativeUpdateRegion.Clear(); } void wxWindowGTK::SetDoubleBuffered( bool on ) @@ -3933,6 +3940,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") );