diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index bc36ba9125..e1928cc532 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -25,7 +25,7 @@ #include "wx/generic/imaglist.h" #ifndef wxUSE_GENERIC_LIST_EXTENSIONS -#define wxUSE_GENERIC_LIST_EXTENSIONS 1 +#define wxUSE_GENERIC_LIST_EXTENSIONS 0 #endif // ============================================================================ diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 70c83e3c77..55d5e95511 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -267,8 +267,6 @@ bool wxDialog::Create( wxWindow *parent, const wxPoint &pos, const wxSize &size, long style, const wxString &name ) { - g_openDialogs++; - wxTopLevelWindows.Append( this ); m_needParent = FALSE; @@ -345,8 +343,6 @@ wxDialog::~wxDialog() { wxTheApp->ExitMainLoop(); } - - g_openDialogs--; } void wxDialog::SetTitle( const wxString& title ) @@ -631,10 +627,14 @@ int wxDialog::ShowModal() m_modalShowing = TRUE; + g_openDialogs++; + gtk_grab_add( m_widget ); gtk_main(); gtk_grab_remove( m_widget ); + g_openDialogs--; + return GetReturnCode(); } diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 06e4797192..78bb5fea4f 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -747,6 +747,8 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW win->GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height ); + win->m_clipPaintRegion = TRUE; + wxEraseEvent eevent( win->GetId() ); eevent.SetEventObject( win ); win->GetEventHandler()->ProcessEvent(eevent); @@ -757,6 +759,8 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW win->GetUpdateRegion().Clear(); + win->m_clipPaintRegion = FALSE; + GList *children = pizza->children; while (children) { @@ -765,7 +769,9 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW GdkRectangle child_area; if (gtk_widget_intersect (child->widget, rect, &child_area)) - gtk_widget_draw (child->widget, (GdkRectangle*) NULL ); + { + gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ ); + } } } diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 70c83e3c77..55d5e95511 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -267,8 +267,6 @@ bool wxDialog::Create( wxWindow *parent, const wxPoint &pos, const wxSize &size, long style, const wxString &name ) { - g_openDialogs++; - wxTopLevelWindows.Append( this ); m_needParent = FALSE; @@ -345,8 +343,6 @@ wxDialog::~wxDialog() { wxTheApp->ExitMainLoop(); } - - g_openDialogs--; } void wxDialog::SetTitle( const wxString& title ) @@ -631,10 +627,14 @@ int wxDialog::ShowModal() m_modalShowing = TRUE; + g_openDialogs++; + gtk_grab_add( m_widget ); gtk_main(); gtk_grab_remove( m_widget ); + g_openDialogs--; + return GetReturnCode(); } diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 06e4797192..78bb5fea4f 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -747,6 +747,8 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW win->GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height ); + win->m_clipPaintRegion = TRUE; + wxEraseEvent eevent( win->GetId() ); eevent.SetEventObject( win ); win->GetEventHandler()->ProcessEvent(eevent); @@ -757,6 +759,8 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW win->GetUpdateRegion().Clear(); + win->m_clipPaintRegion = FALSE; + GList *children = pizza->children; while (children) { @@ -765,7 +769,9 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW GdkRectangle child_area; if (gtk_widget_intersect (child->widget, rect, &child_area)) - gtk_widget_draw (child->widget, (GdkRectangle*) NULL ); + { + gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ ); + } } }