From: Paul Cornett Date: Thu, 7 Sep 2006 16:06:47 +0000 (+0000) Subject: GtkOnSize parameters aren't useful X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b5e31cc8e2c4e5399548a637e3b9705d37a19335 GtkOnSize parameters aren't useful git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/gtk/frame.h b/include/wx/gtk/frame.h index 5711e98338..c052cd6388 100644 --- a/include/wx/gtk/frame.h +++ b/include/wx/gtk/frame.h @@ -7,8 +7,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __GTKFRAMEH__ -#define __GTKFRAMEH__ +#ifndef _WX_GTK_FRAME_H_ +#define _WX_GTK_FRAME_H_ //----------------------------------------------------------------------------- // classes @@ -75,7 +75,7 @@ public: // -------------------------- // GTK callbacks - virtual void GtkOnSize( int x, int y, int width, int height ); + virtual void GtkOnSize(); virtual void OnInternalIdle(); bool m_menuBarDetached; @@ -108,4 +108,4 @@ public: DECLARE_DYNAMIC_CLASS(wxFrame) }; -#endif // __GTKFRAMEH__ +#endif // _WX_GTK_FRAME_H_ diff --git a/include/wx/gtk/mdi.h b/include/wx/gtk/mdi.h index 9a84aeb815..e881dd1319 100644 --- a/include/wx/gtk/mdi.h +++ b/include/wx/gtk/mdi.h @@ -58,7 +58,7 @@ public: wxMDIClientWindow *m_clientWindow; bool m_justInserted; - virtual void GtkOnSize( int x, int y, int width, int height ); + virtual void GtkOnSize(); virtual void OnInternalIdle(); protected: diff --git a/include/wx/gtk/popupwin.h b/include/wx/gtk/popupwin.h index 04e00ad33f..18b7a743cc 100644 --- a/include/wx/gtk/popupwin.h +++ b/include/wx/gtk/popupwin.h @@ -37,7 +37,7 @@ public: protected: - void GtkOnSize( int x, int y, int width, int height ); + void GtkOnSize(); virtual void DoSetSize(int x, int y, int width, int height, diff --git a/include/wx/gtk/toplevel.h b/include/wx/gtk/toplevel.h index de507a0dae..ac0081c8fc 100644 --- a/include/wx/gtk/toplevel.h +++ b/include/wx/gtk/toplevel.h @@ -7,8 +7,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __GTKTOPLEVELH__ -#define __GTKTOPLEVELH__ +#ifndef _WX_GTK_TOPLEVEL_H_ +#define _WX_GTK_TOPLEVEL_H_ //----------------------------------------------------------------------------- // wxTopLevelWindowGTK @@ -82,7 +82,7 @@ public: // -------------------------- // GTK callbacks - virtual void GtkOnSize( int x, int y, int width, int height ); + virtual void GtkOnSize(); virtual void OnInternalIdle(); // do *not* call this to iconize the frame, this is a private function! @@ -131,4 +131,4 @@ protected: bool m_grabbed; }; -#endif // __GTKTOPLEVELH__ +#endif // _WX_GTK_TOPLEVEL_H_ diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 2d37fd8b8e..2ff8564b78 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -83,7 +83,7 @@ bool wxDialog::Show( bool show ) much ugly flicker nor from within the size_allocate handler, because GTK 1.1.X forbids that. */ - GtkOnSize( m_x, m_y, m_width, m_height ); + GtkOnSize(); } bool ret = wxWindow::Show( show ); diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index 19cacb5d83..423f779e14 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -326,13 +326,8 @@ void wxFrame::DoSetClientSize( int width, int height ) wxTopLevelWindow::DoSetClientSize( width, height ); } -void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), - int width, int height ) +void wxFrame::GtkOnSize() { - // due to a bug in gtk, x,y are always 0 - // m_x = x; - // m_y = y; - // avoid recursions if (m_resizing) return; m_resizing = true; @@ -340,9 +335,6 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), // this shouldn't happen: wxFrame, wxMDIParentFrame and wxMDIChildFrame have m_wxwindow wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") ); - m_width = width; - m_height = height; - // space occupied by m_frameToolBar and m_frameMenuBar int client_area_x_offset = 0, client_area_y_offset = 0; diff --git a/src/gtk/mdi.cpp b/src/gtk/mdi.cpp index 33378f7785..e966f0c877 100644 --- a/src/gtk/mdi.cpp +++ b/src/gtk/mdi.cpp @@ -126,9 +126,9 @@ bool wxMDIParentFrame::Create(wxWindow *parent, return true; } -void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height ) +void wxMDIParentFrame::GtkOnSize() { - wxFrame::GtkOnSize( x, y, width, height ); + wxFrame::GtkOnSize(); wxMDIChildFrame *child_frame = GetActiveChild(); if (!child_frame) return; diff --git a/src/gtk/popupwin.cpp b/src/gtk/popupwin.cpp index 0889be36d3..8d1a10b4f9 100644 --- a/src/gtk/popupwin.cpp +++ b/src/gtk/popupwin.cpp @@ -301,18 +301,11 @@ void wxPopupWindow::DoSetSize( int x, int y, int width, int height, int sizeFlag m_resizing = false; } -void wxPopupWindow::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height ) +void wxPopupWindow::GtkOnSize() { - // due to a bug in gtk, x,y are always 0 - // m_x = x; - // m_y = y; - - if ((m_height == height) && (m_width == width) && (m_sizeSet)) return; + if (m_sizeSet) return; if (!m_wxwindow) return; - m_width = width; - m_height = height; - /* FIXME: is this a hack? */ /* Since for some reason GTK will revert to using maximum size ever set for this window, we have to set geometry hints maxsize to match size @@ -342,7 +335,7 @@ void wxPopupWindow::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int void wxPopupWindow::OnInternalIdle() { if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow)) - GtkOnSize( m_x, m_y, m_width, m_height ); + GtkOnSize(); wxWindow::OnInternalIdle(); } @@ -356,7 +349,7 @@ bool wxPopupWindow::Show( bool show ) much ugly flicker nor from within the size_allocate handler, because GTK 1.1.X forbids that. */ - GtkOnSize( m_x, m_y, m_width, m_height ); + GtkOnSize(); } bool ret = wxWindow::Show( show ); diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 3ee1c1efe0..278629e5fa 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -800,7 +800,7 @@ bool wxTopLevelWindowGTK::Show( bool show ) much ugly flicker or from within the size_allocate handler, because GTK 1.1.X forbids that. */ - GtkOnSize( m_x, m_y, m_width, m_height ); + GtkOnSize(); } // This seems no longer to be needed and the call @@ -937,22 +937,14 @@ void wxTopLevelWindowGTK::DoSetClientSize( int width, int height ) width + m_miniEdge*2, height + m_miniEdge*2 + m_miniTitle, 0); } -void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), - int width, int height ) +void wxTopLevelWindowGTK::GtkOnSize() { - // due to a bug in gtk, x,y are always 0 - // m_x = x; - // m_y = y; - // avoid recursions if (m_resizing) return; m_resizing = true; if ( m_wxwindow == NULL ) return; - m_width = width; - m_height = height; - /* wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses wxWindow::Create to create it's GTK equivalent. m_mainWidget is only set in wxFrame::Create so it is used to check what kind of frame we @@ -1054,7 +1046,7 @@ void wxTopLevelWindowGTK::OnInternalIdle() { if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow)) { - GtkOnSize( m_x, m_y, m_width, m_height ); + GtkOnSize(); // we'll come back later if (g_isIdle)