X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3208e55e12f7f8509aedf7b85c2864adeb85ffc9..9b0b3151e03b347f8f153c1da73799fb575ac26c:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 081370a010..abd0171fe1 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -78,8 +78,6 @@ #undef HAVE_XIM #endif -extern GtkContainerClass *pizza_parent_class; - //----------------------------------------------------------------------------- // documentation on internals //----------------------------------------------------------------------------- @@ -513,8 +511,6 @@ gtk_window_expose_callback( GtkWidget *widget, win->GtkSendPaintEvents(); // Let parent window draw window-less widgets - (* GTK_WIDGET_CLASS (pizza_parent_class)->expose_event) (widget, gdk_event); - return FALSE; } } @@ -2141,7 +2137,7 @@ void gtk_window_size_callback( GtkWidget *WXUNUSED(widget), alloc->height ); #endif - GTK_PIZZA(win->m_wxwindow)->m_width = alloc->width; + GTK_PIZZA(win->m_wxwindow)->m_width = win->GetClientSize().x; win->m_oldClientWidth = client_width; win->m_oldClientHeight = client_height; @@ -2469,7 +2465,7 @@ bool wxWindowGTK::Create( wxWindow *parent, #ifndef __WXUNIVERSAL__ GtkPizza *pizza = GTK_PIZZA(m_wxwindow); - + if (HasFlag(wxRAISED_BORDER)) { gtk_pizza_set_shadow_type( pizza, GTK_MYSHADOW_OUT ); @@ -2604,8 +2600,6 @@ void wxWindowGTK::PostCreation() { // these get reported to wxWidgets -> wxPaintEvent - gtk_pizza_set_external( GTK_PIZZA(m_wxwindow), TRUE ); - g_signal_connect (m_wxwindow, "expose_event", G_CALLBACK (gtk_window_expose_callback), this); @@ -2759,10 +2753,6 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") ); wxASSERT_MSG( (m_parent != NULL), wxT("wxWindowGTK::SetSize requires parent.\n") ); -/* - printf( "DoSetSize: name %s, x,y,w,h: %d,%d,%d,%d \n", GetName().c_str(), x,y,width,height ); -*/ - if (m_resizing) return; /* I don't like recursions */ m_resizing = true; @@ -3113,7 +3103,15 @@ void wxWindowGTK::DoClientToScreen( int *x, int *y ) const } } - if (x) *x += org_x; + + if (x) + { + if (GetLayoutDirection() == wxLayout_RightToLeft) + *x = (GetClientSize().x - *x) + org_x; + else + *x += org_x; + } + if (y) *y += org_y; } @@ -3142,7 +3140,13 @@ void wxWindowGTK::DoScreenToClient( int *x, int *y ) const } } - if (x) *x -= org_x; + if (x) + { + if (GetLayoutDirection() == wxLayout_RightToLeft) + *x = (GetClientSize().x - *x) - org_x; + else + *x -= org_x; + } if (y) *y -= org_y; } @@ -3758,6 +3762,8 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect ) gdk_rect.y = rect->y; gdk_rect.width = rect->width; gdk_rect.height = rect->height; + if (GetLayoutDirection() == wxLayout_RightToLeft) + gdk_rect.x = GetClientSize().x - gdk_rect.x - gdk_rect.width; p = &gdk_rect; } else // invalidate everything @@ -3765,8 +3771,6 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect ) p = NULL; } - p = NULL; - gdk_window_invalidate_rect( GTK_PIZZA(m_wxwindow)->bin_window, p, TRUE ); } }