X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f362b96d6701d2da187c13a1b34a2e71c1cbb90c..9d2f3c71d83c52fc4db6c8041de533562816b1d6:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 5adc32e77e..7f2fa89f26 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -121,12 +121,6 @@ */ -//------------------------------------------------------------------------- -// constants -//------------------------------------------------------------------------- - -#define FRAME_BORDER_WIDTH 2 - //----------------------------------------------------------------------------- // data //----------------------------------------------------------------------------- @@ -141,6 +135,8 @@ static wxWindow *g_focusWindow = (wxWindow*) NULL; the last click here */ static guint32 gs_timeLastClick = 0; +#if (GTK_MINOR_VERSION > 0) + //----------------------------------------------------------------------------- // local code (see below) //----------------------------------------------------------------------------- @@ -227,6 +223,8 @@ static void gtk_window_own_draw_callback( GtkWidget *widget, GdkRectangle *WXUNU draw_frame( widget, win ); } +#endif + //----------------------------------------------------------------------------- // "expose_event" of m_wxwindow //----------------------------------------------------------------------------- @@ -1740,12 +1738,14 @@ void wxWindow::PostCreation() gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw", GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this ); +#if (GTK_MINOR_VERSION > 0) /* these are called when the "sunken" or "raised" borders are drawn */ gtk_signal_connect( GTK_OBJECT(m_widget), "expose_event", GTK_SIGNAL_FUNC(gtk_window_own_expose_callback), (gpointer)this ); gtk_signal_connect( GTK_OBJECT(m_widget), "draw", GTK_SIGNAL_FUNC(gtk_window_own_draw_callback), (gpointer)this ); +#endif } ConnectWidget( GetConnectWidget() ); @@ -3133,6 +3133,14 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) wxCHECK_RET( m_wxwindow != NULL, "window needs client area for scrolling" ); + wxNode *node = m_children.First(); + while (node) + { + wxWindow *child = (wxWindow*) node->Data(); + child->Move( child->m_x + dx, child->m_y + dy ); + node = node->Next(); + } + int cw = 0; int ch = 0; GetClientSize( &cw, &ch );