Always send an erase event to satisfy some users...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-02-20 21:50:17 +00:00
parent 6f0dd6b274
commit 2e09dc2dc8
3 changed files with 17 additions and 3 deletions

View File

@@ -775,6 +775,7 @@ static int gtk_window_expose_callback( GtkWidget *widget,
} }
*/ */
#ifndef __WXUNIVERSAL__
GtkPizza *pizza = GTK_PIZZA (widget); GtkPizza *pizza = GTK_PIZZA (widget);
if (win->GetThemeEnabled()) if (win->GetThemeEnabled())
@@ -794,6 +795,7 @@ static int gtk_window_expose_callback( GtkWidget *widget,
(char *)"base", (char *)"base",
0, 0, -1, -1); 0, 0, -1, -1);
} }
#endif
win->GetUpdateRegion().Union( gdk_event->area.x, win->GetUpdateRegion().Union( gdk_event->area.x,
gdk_event->area.y, gdk_event->area.y,
@@ -801,6 +803,7 @@ static int gtk_window_expose_callback( GtkWidget *widget,
gdk_event->area.height ); gdk_event->area.height );
// Actual redrawing takes place in idle time. // Actual redrawing takes place in idle time.
win->Update();
return TRUE; return TRUE;
} }
@@ -865,6 +868,7 @@ static void gtk_window_draw_callback( GtkWidget *widget,
} }
*/ */
#ifndef __WXUNIVERSAL__
GtkPizza *pizza = GTK_PIZZA (widget); GtkPizza *pizza = GTK_PIZZA (widget);
if (win->GetThemeEnabled()) if (win->GetThemeEnabled())
@@ -892,10 +896,13 @@ static void gtk_window_draw_callback( GtkWidget *widget,
gdk_window_clear_area( pizza->bin_window, gdk_window_clear_area( pizza->bin_window,
rect->x, rect->y, rect->width, rect->height); rect->x, rect->y, rect->width, rect->height);
} }
#endif
win->GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height ); win->GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height );
// Actual redrawing takes place in idle time. // Actual redrawing takes place in idle time.
win->Update();
#ifndef __WXUNIVERSAL__ #ifndef __WXUNIVERSAL__
// Redraw child widgets // Redraw child widgets
@@ -3388,7 +3395,7 @@ void wxWindowGTK::GtkSendPaintEvents()
m_clipPaintRegion = TRUE; m_clipPaintRegion = TRUE;
if (!m_clearRegion.IsEmpty()) // if (!m_clearRegion.IsEmpty()) // always send an erase event
{ {
wxWindowDC dc( (wxWindow*)this ); wxWindowDC dc( (wxWindow*)this );
dc.SetClippingRegion( m_clearRegion ); dc.SetClippingRegion( m_clearRegion );

View File

@@ -775,6 +775,7 @@ static int gtk_window_expose_callback( GtkWidget *widget,
} }
*/ */
#ifndef __WXUNIVERSAL__
GtkPizza *pizza = GTK_PIZZA (widget); GtkPizza *pizza = GTK_PIZZA (widget);
if (win->GetThemeEnabled()) if (win->GetThemeEnabled())
@@ -794,6 +795,7 @@ static int gtk_window_expose_callback( GtkWidget *widget,
(char *)"base", (char *)"base",
0, 0, -1, -1); 0, 0, -1, -1);
} }
#endif
win->GetUpdateRegion().Union( gdk_event->area.x, win->GetUpdateRegion().Union( gdk_event->area.x,
gdk_event->area.y, gdk_event->area.y,
@@ -801,6 +803,7 @@ static int gtk_window_expose_callback( GtkWidget *widget,
gdk_event->area.height ); gdk_event->area.height );
// Actual redrawing takes place in idle time. // Actual redrawing takes place in idle time.
win->Update();
return TRUE; return TRUE;
} }
@@ -865,6 +868,7 @@ static void gtk_window_draw_callback( GtkWidget *widget,
} }
*/ */
#ifndef __WXUNIVERSAL__
GtkPizza *pizza = GTK_PIZZA (widget); GtkPizza *pizza = GTK_PIZZA (widget);
if (win->GetThemeEnabled()) if (win->GetThemeEnabled())
@@ -892,10 +896,13 @@ static void gtk_window_draw_callback( GtkWidget *widget,
gdk_window_clear_area( pizza->bin_window, gdk_window_clear_area( pizza->bin_window,
rect->x, rect->y, rect->width, rect->height); rect->x, rect->y, rect->width, rect->height);
} }
#endif
win->GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height ); win->GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height );
// Actual redrawing takes place in idle time. // Actual redrawing takes place in idle time.
win->Update();
#ifndef __WXUNIVERSAL__ #ifndef __WXUNIVERSAL__
// Redraw child widgets // Redraw child widgets
@@ -3388,7 +3395,7 @@ void wxWindowGTK::GtkSendPaintEvents()
m_clipPaintRegion = TRUE; m_clipPaintRegion = TRUE;
if (!m_clearRegion.IsEmpty()) // if (!m_clearRegion.IsEmpty()) // always send an erase event
{ {
wxWindowDC dc( (wxWindow*)this ); wxWindowDC dc( (wxWindow*)this );
dc.SetClippingRegion( m_clearRegion ); dc.SetClippingRegion( m_clearRegion );

View File

@@ -1259,7 +1259,7 @@ void wxMenu::Popup(const wxPoint& pos, const wxSize& size, bool selectFirst)
{ {
m_popupMenu->SelectFirst(); m_popupMenu->SelectFirst();
} }
// the geometry might have changed since the last time we were shown, so // the geometry might have changed since the last time we were shown, so
// always resize // always resize
m_popupMenu->SetClientSize(GetGeometryInfo().GetSize()); m_popupMenu->SetClientSize(GetGeometryInfo().GetSize());