From 59678f3fae7d537003fe1dbd0d0049694ec946c1 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 19 May 2007 18:25:15 +0000 Subject: [PATCH 1/1] move m_sizeSet out of wxWindow git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/popupwin.h | 2 ++ include/wx/gtk/toplevel.h | 4 ++++ include/wx/gtk/window.h | 7 ------- src/gtk/mdi.cpp | 2 +- src/gtk/window.cpp | 1 - 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/include/wx/gtk/popupwin.h b/include/wx/gtk/popupwin.h index 18b7a743cc..e150b2d3e7 100644 --- a/include/wx/gtk/popupwin.h +++ b/include/wx/gtk/popupwin.h @@ -46,6 +46,8 @@ protected: virtual void DoMoveWindow(int x, int y, int width, int height); private: + bool m_sizeSet; + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxPopupWindow) }; diff --git a/include/wx/gtk/toplevel.h b/include/wx/gtk/toplevel.h index 7c0998c7df..bd0792f340 100644 --- a/include/wx/gtk/toplevel.h +++ b/include/wx/gtk/toplevel.h @@ -103,6 +103,8 @@ public: long m_gdkFunc, m_gdkDecor; + bool m_sizeSet; + // private gtk_timeout_add result for mimicing wxUSER_ATTENTION_INFO and // wxUSER_ATTENTION_ERROR difference, -2 for no hint, -1 for ERROR hint, rest for GtkTimeout handle. int m_urgency_hint; @@ -116,6 +118,8 @@ public: // return the full size of the window without WM decorations void GTKDoGetSize(int *width, int *height) const; + void GtkUpdateSize() { m_sizeSet = false; } + protected: // common part of all ctors void Init(); diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index 5bcfb26b5c..60ee66ab09 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -220,12 +220,6 @@ public: virtual void ApplyToolTip( GtkTooltips *tips, const wxChar *tip ); #endif // wxUSE_TOOLTIPS - // Called from GTK signal handlers. it indicates that - // the layouting functions have to be called later on - // (i.e. in idle time, implemented in OnInternalIdle() ). - void GtkUpdateSize() { m_sizeSet = false; } - - // Called when a window should delay showing itself // until idle time. This partly mimmicks defered // sizing under MSW. @@ -304,7 +298,6 @@ public: bool m_nativeSizeEvent:1; // wxGLCanvas sends wxSizeEvent upon "alloc_size" bool m_hasScrolling:1; bool m_hasVMT:1; - bool m_sizeSet:1; bool m_resizing:1; bool m_hasFocus:1; // true if == FindFocus() bool m_isScrolling:1; // dragging scrollbar thumb? diff --git a/src/gtk/mdi.cpp b/src/gtk/mdi.cpp index 51027b628d..3525a297db 100644 --- a/src/gtk/mdi.cpp +++ b/src/gtk/mdi.cpp @@ -424,7 +424,7 @@ void wxMDIChildFrame::SetTitle( const wxString &title ) //----------------------------------------------------------------------------- extern "C" { -static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win ) +static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxMDIChildFrame *win ) { if ((win->m_x == alloc->x) && (win->m_y == alloc->y) && diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 0b1aff6fa8..2389e69cd6 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2246,7 +2246,6 @@ void wxWindowGTK::Init() m_width = 0; m_height = 0; - m_sizeSet = false; m_hasVMT = false; m_isBeingDeleted = false; -- 2.47.2