From dd982649719f6bea903129c20fed5726a97c7fb9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 28 Aug 2000 20:20:11 +0000 Subject: [PATCH] create a DC for wxEraseEvent git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 8 +++++--- src/gtk1/window.cpp | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 8f921839aa..258ef43e0e 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -14,7 +14,7 @@ #include "wx/defs.h" #include "wx/window.h" -#include "wx/dc.h" +#include "wx/dcclient.h" #include "wx/frame.h" #include "wx/app.h" #include "wx/layout.h" @@ -669,7 +669,8 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev if (gdk_event->count == 0) { - wxEraseEvent eevent( win->GetId() ); + wxClientDC dc(this); + wxEraseEvent eevent( win->GetId(), &dc ); eevent.SetEventObject( win ); win->GetEventHandler()->ProcessEvent(eevent); @@ -771,7 +772,8 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW win->m_clipPaintRegion = TRUE; - wxEraseEvent eevent( win->GetId() ); + wxClientDC dc(this); + wxEraseEvent eevent( win->GetId(), &dc ); eevent.SetEventObject( win ); win->GetEventHandler()->ProcessEvent(eevent); diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 8f921839aa..258ef43e0e 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -14,7 +14,7 @@ #include "wx/defs.h" #include "wx/window.h" -#include "wx/dc.h" +#include "wx/dcclient.h" #include "wx/frame.h" #include "wx/app.h" #include "wx/layout.h" @@ -669,7 +669,8 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev if (gdk_event->count == 0) { - wxEraseEvent eevent( win->GetId() ); + wxClientDC dc(this); + wxEraseEvent eevent( win->GetId(), &dc ); eevent.SetEventObject( win ); win->GetEventHandler()->ProcessEvent(eevent); @@ -771,7 +772,8 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW win->m_clipPaintRegion = TRUE; - wxEraseEvent eevent( win->GetId() ); + wxClientDC dc(this); + wxEraseEvent eevent( win->GetId(), &dc ); eevent.SetEventObject( win ); win->GetEventHandler()->ProcessEvent(eevent);