diff --git a/include/wx/gtk/bitmap.h b/include/wx/gtk/bitmap.h index 5096d3b8b5..41959d5ba6 100644 --- a/include/wx/gtk/bitmap.h +++ b/include/wx/gtk/bitmap.h @@ -70,8 +70,8 @@ public: wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM ); ~wxBitmap(); wxBitmap& operator = ( const wxBitmap& bmp ); - bool operator == ( const wxBitmap& bmp ); - bool operator != ( const wxBitmap& bmp ); + bool operator == ( const wxBitmap& bmp ) const; + bool operator != ( const wxBitmap& bmp ) const; bool Ok() const; bool Create(int width, int height, int depth = -1); diff --git a/include/wx/gtk/brush.h b/include/wx/gtk/brush.h index d42e564a81..31d4b7292c 100644 --- a/include/wx/gtk/brush.h +++ b/include/wx/gtk/brush.h @@ -40,8 +40,8 @@ public: wxBrush( const wxBrush &brush ); ~wxBrush(); wxBrush& operator = ( const wxBrush& brush ); - bool operator == ( const wxBrush& brush ); - bool operator != ( const wxBrush& brush ); + bool operator == ( const wxBrush& brush ) const; + bool operator != ( const wxBrush& brush ) const; bool Ok() const; int GetStyle() const; diff --git a/include/wx/gtk/pen.h b/include/wx/gtk/pen.h index f8fa1c8da6..7e6f2c7335 100644 --- a/include/wx/gtk/pen.h +++ b/include/wx/gtk/pen.h @@ -45,8 +45,8 @@ public: wxPen( const wxPen& pen ); ~wxPen(); wxPen& operator = ( const wxPen& pen ); - bool operator == ( const wxPen& pen ); - bool operator != ( const wxPen& pen ); + bool operator == ( const wxPen& pen ) const; + bool operator != ( const wxPen& pen ) const; void SetColour( const wxColour &colour ); void SetColour( int red, int green, int blue ); diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index 5096d3b8b5..41959d5ba6 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -70,8 +70,8 @@ public: wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM ); ~wxBitmap(); wxBitmap& operator = ( const wxBitmap& bmp ); - bool operator == ( const wxBitmap& bmp ); - bool operator != ( const wxBitmap& bmp ); + bool operator == ( const wxBitmap& bmp ) const; + bool operator != ( const wxBitmap& bmp ) const; bool Ok() const; bool Create(int width, int height, int depth = -1); diff --git a/include/wx/gtk1/brush.h b/include/wx/gtk1/brush.h index d42e564a81..31d4b7292c 100644 --- a/include/wx/gtk1/brush.h +++ b/include/wx/gtk1/brush.h @@ -40,8 +40,8 @@ public: wxBrush( const wxBrush &brush ); ~wxBrush(); wxBrush& operator = ( const wxBrush& brush ); - bool operator == ( const wxBrush& brush ); - bool operator != ( const wxBrush& brush ); + bool operator == ( const wxBrush& brush ) const; + bool operator != ( const wxBrush& brush ) const; bool Ok() const; int GetStyle() const; diff --git a/include/wx/gtk1/pen.h b/include/wx/gtk1/pen.h index f8fa1c8da6..7e6f2c7335 100644 --- a/include/wx/gtk1/pen.h +++ b/include/wx/gtk1/pen.h @@ -45,8 +45,8 @@ public: wxPen( const wxPen& pen ); ~wxPen(); wxPen& operator = ( const wxPen& pen ); - bool operator == ( const wxPen& pen ); - bool operator != ( const wxPen& pen ); + bool operator == ( const wxPen& pen ) const; + bool operator != ( const wxPen& pen ) const; void SetColour( const wxColour &colour ); void SetColour( int red, int green, int blue ); diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 38d20c606c..1e49da571c 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -351,12 +351,12 @@ wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp ) return *this; } -bool wxBitmap::operator == ( const wxBitmap& bmp ) +bool wxBitmap::operator == ( const wxBitmap& bmp ) const { return m_refData == bmp.m_refData; } -bool wxBitmap::operator != ( const wxBitmap& bmp ) +bool wxBitmap::operator != ( const wxBitmap& bmp ) const { return m_refData != bmp.m_refData; } diff --git a/src/gtk/brush.cpp b/src/gtk/brush.cpp index b58261b95c..70a2790e4a 100644 --- a/src/gtk/brush.cpp +++ b/src/gtk/brush.cpp @@ -96,12 +96,12 @@ wxBrush& wxBrush::operator = ( const wxBrush& brush ) return *this; } -bool wxBrush::operator == ( const wxBrush& brush ) +bool wxBrush::operator == ( const wxBrush& brush ) const { return m_refData == brush.m_refData; } -bool wxBrush::operator != ( const wxBrush& brush ) +bool wxBrush::operator != ( const wxBrush& brush ) const { return m_refData != brush.m_refData; } diff --git a/src/gtk/pen.cpp b/src/gtk/pen.cpp index 90a54a25ee..8ac1097aa8 100644 --- a/src/gtk/pen.cpp +++ b/src/gtk/pen.cpp @@ -100,12 +100,12 @@ wxPen& wxPen::operator = ( const wxPen& pen ) return *this; } -bool wxPen::operator == ( const wxPen& pen ) +bool wxPen::operator == ( const wxPen& pen ) const { return m_refData == pen.m_refData; } -bool wxPen::operator != ( const wxPen& pen ) +bool wxPen::operator != ( const wxPen& pen ) const { return m_refData != pen.m_refData; } diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 91580d8320..8a23a84b3e 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -636,9 +636,6 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev } */ - if (!win->m_queuedFullRedraw) - { - win->GetUpdateRegion().Union( gdk_event->area.x, gdk_event->area.y, gdk_event->area.width, @@ -683,7 +680,6 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev gtk_widget_event (child->widget, (GdkEvent*) &child_event); } } - } return TRUE; } @@ -738,9 +734,6 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW GtkPizza *pizza = GTK_PIZZA (widget); - if (!win->m_queuedFullRedraw) - { - if (!(GTK_WIDGET_APP_PAINTABLE (widget)) && (pizza->clear_on_draw)) { @@ -777,7 +770,6 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ ); } } - } } //----------------------------------------------------------------------------- @@ -2062,7 +2054,6 @@ void wxWindow::Init() m_acceptsFocus = FALSE; m_clipPaintRegion = FALSE; - m_queuedFullRedraw = FALSE; m_cursor = *wxSTANDARD_CURSOR; @@ -2403,24 +2394,6 @@ bool wxWindow::Destroy() void wxWindow::DoMoveWindow(int x, int y, int width, int height) { - if (m_wxwindow && GTK_PIZZA(m_wxwindow)->bin_window) - { - /* Normally, GTK will send expose events only for the regions - which actually got exposed. Sadly, wxMSW invalidates - the whole window so we have to do that, too. We could - simply add a complete refresh, but we would then get - the normal GTK expose events in surplus, so we shut - off the expose events and schedule a full redraw to - be done in OnInternalIdle, where we restore the handling - of expose events. */ - - m_queuedFullRedraw = TRUE; - - GdkEventMask mask = gdk_window_get_events( GTK_PIZZA(m_wxwindow)->bin_window ); - mask = (GdkEventMask)(mask & ~GDK_EXPOSURE_MASK); - gdk_window_set_events( GTK_PIZZA(m_wxwindow)->bin_window, mask ); - } - gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), m_widget, x, y, width, height ); } @@ -2568,39 +2541,6 @@ void wxWindow::OnInternalIdle() } UpdateWindowUI(); - - if (m_queuedFullRedraw) - { - /* See also wxWindow::DoMoveWindow for explanation of this code. What - we test here is if the requested size of the window is the same as - the actual size of window, in which case all expose events that resulted - from resizing the window have been sent (and discarded) and we can - now do our full redraw and switch on expose event handling again. */ - - bool child_already_resized = FALSE; - if (IsTopLevel() && !m_isFrame) - { - child_already_resized = ((m_wxwindow->parent) && - (gtk_pizza_child_resized( GTK_PIZZA(m_wxwindow->parent), m_wxwindow ))); - } - else - { - child_already_resized = ((m_widget->parent) && - (gtk_pizza_child_resized( GTK_PIZZA(m_widget->parent), m_widget ))); - } - - if (child_already_resized) - { - m_queuedFullRedraw = FALSE; - m_updateRegion.Clear(); - m_updateRegion.Union( 0,0,m_width,m_height ); - gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL ); - - GdkEventMask mask = gdk_window_get_events( GTK_PIZZA(m_wxwindow)->bin_window ); - mask = (GdkEventMask)(mask | GDK_EXPOSURE_MASK); - gdk_window_set_events( GTK_PIZZA(m_wxwindow)->bin_window, mask ); - } - } } void wxWindow::DoGetSize( int *width, int *height ) const diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index 38d20c606c..1e49da571c 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -351,12 +351,12 @@ wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp ) return *this; } -bool wxBitmap::operator == ( const wxBitmap& bmp ) +bool wxBitmap::operator == ( const wxBitmap& bmp ) const { return m_refData == bmp.m_refData; } -bool wxBitmap::operator != ( const wxBitmap& bmp ) +bool wxBitmap::operator != ( const wxBitmap& bmp ) const { return m_refData != bmp.m_refData; } diff --git a/src/gtk1/brush.cpp b/src/gtk1/brush.cpp index b58261b95c..70a2790e4a 100644 --- a/src/gtk1/brush.cpp +++ b/src/gtk1/brush.cpp @@ -96,12 +96,12 @@ wxBrush& wxBrush::operator = ( const wxBrush& brush ) return *this; } -bool wxBrush::operator == ( const wxBrush& brush ) +bool wxBrush::operator == ( const wxBrush& brush ) const { return m_refData == brush.m_refData; } -bool wxBrush::operator != ( const wxBrush& brush ) +bool wxBrush::operator != ( const wxBrush& brush ) const { return m_refData != brush.m_refData; } diff --git a/src/gtk1/pen.cpp b/src/gtk1/pen.cpp index 90a54a25ee..8ac1097aa8 100644 --- a/src/gtk1/pen.cpp +++ b/src/gtk1/pen.cpp @@ -100,12 +100,12 @@ wxPen& wxPen::operator = ( const wxPen& pen ) return *this; } -bool wxPen::operator == ( const wxPen& pen ) +bool wxPen::operator == ( const wxPen& pen ) const { return m_refData == pen.m_refData; } -bool wxPen::operator != ( const wxPen& pen ) +bool wxPen::operator != ( const wxPen& pen ) const { return m_refData != pen.m_refData; } diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 91580d8320..8a23a84b3e 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -636,9 +636,6 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev } */ - if (!win->m_queuedFullRedraw) - { - win->GetUpdateRegion().Union( gdk_event->area.x, gdk_event->area.y, gdk_event->area.width, @@ -683,7 +680,6 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev gtk_widget_event (child->widget, (GdkEvent*) &child_event); } } - } return TRUE; } @@ -738,9 +734,6 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW GtkPizza *pizza = GTK_PIZZA (widget); - if (!win->m_queuedFullRedraw) - { - if (!(GTK_WIDGET_APP_PAINTABLE (widget)) && (pizza->clear_on_draw)) { @@ -777,7 +770,6 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ ); } } - } } //----------------------------------------------------------------------------- @@ -2062,7 +2054,6 @@ void wxWindow::Init() m_acceptsFocus = FALSE; m_clipPaintRegion = FALSE; - m_queuedFullRedraw = FALSE; m_cursor = *wxSTANDARD_CURSOR; @@ -2403,24 +2394,6 @@ bool wxWindow::Destroy() void wxWindow::DoMoveWindow(int x, int y, int width, int height) { - if (m_wxwindow && GTK_PIZZA(m_wxwindow)->bin_window) - { - /* Normally, GTK will send expose events only for the regions - which actually got exposed. Sadly, wxMSW invalidates - the whole window so we have to do that, too. We could - simply add a complete refresh, but we would then get - the normal GTK expose events in surplus, so we shut - off the expose events and schedule a full redraw to - be done in OnInternalIdle, where we restore the handling - of expose events. */ - - m_queuedFullRedraw = TRUE; - - GdkEventMask mask = gdk_window_get_events( GTK_PIZZA(m_wxwindow)->bin_window ); - mask = (GdkEventMask)(mask & ~GDK_EXPOSURE_MASK); - gdk_window_set_events( GTK_PIZZA(m_wxwindow)->bin_window, mask ); - } - gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), m_widget, x, y, width, height ); } @@ -2568,39 +2541,6 @@ void wxWindow::OnInternalIdle() } UpdateWindowUI(); - - if (m_queuedFullRedraw) - { - /* See also wxWindow::DoMoveWindow for explanation of this code. What - we test here is if the requested size of the window is the same as - the actual size of window, in which case all expose events that resulted - from resizing the window have been sent (and discarded) and we can - now do our full redraw and switch on expose event handling again. */ - - bool child_already_resized = FALSE; - if (IsTopLevel() && !m_isFrame) - { - child_already_resized = ((m_wxwindow->parent) && - (gtk_pizza_child_resized( GTK_PIZZA(m_wxwindow->parent), m_wxwindow ))); - } - else - { - child_already_resized = ((m_widget->parent) && - (gtk_pizza_child_resized( GTK_PIZZA(m_widget->parent), m_widget ))); - } - - if (child_already_resized) - { - m_queuedFullRedraw = FALSE; - m_updateRegion.Clear(); - m_updateRegion.Union( 0,0,m_width,m_height ); - gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL ); - - GdkEventMask mask = gdk_window_get_events( GTK_PIZZA(m_wxwindow)->bin_window ); - mask = (GdkEventMask)(mask | GDK_EXPOSURE_MASK); - gdk_window_set_events( GTK_PIZZA(m_wxwindow)->bin_window, mask ); - } - } } void wxWindow::DoGetSize( int *width, int *height ) const