From f94fca1b74c149f3a3450ba4a8d8e33386eb8f6d Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 14 Jun 2001 16:15:29 +0000 Subject: [PATCH] I don't understand the SetIconState code in /src/frome.cpp, but I know it is wrong. This also caused the splitter window bug. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/frame.cpp | 8 ++++++-- src/gtk/window.cpp | 9 ++++++++- src/gtk1/frame.cpp | 8 ++++++-- src/gtk1/window.cpp | 9 ++++++++- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index cedfca99d5..97e19ac404 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -448,7 +448,7 @@ void wxFrame::Init() m_toolBarDetached = FALSE; m_insertInClientArea = TRUE; m_isFrame = TRUE; - m_isIconized = TRUE; + m_isIconized = FALSE; m_fsIsShowing = FALSE; m_themeEnabled = TRUE; } @@ -1228,7 +1228,11 @@ void wxFrame::SetIconizeState(bool iconize) { // this is not supposed to happen if we're called only from // gtk_frame_(un)map_callback! - wxFAIL_MSG( _T("unexpected call to SendIconizeEvent ignored") ); + + // RR: I don't understand this test. Upon startup, the frame is + // not iconized by default, it has just not been created + // yet. + ///wxFAIL_MSG( _T("unexpected call to SendIconizeEvent ignored") ); } } diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 1e58a816c7..657daceeb7 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2616,7 +2616,7 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags ) wxASSERT_MSG( (m_parent != NULL), wxT("wxWindow::SetSize requires parent.\n") ); /* - printf( "name %s, x,y,w,h: %d,%d,%d,%d \n", GetName().c_str(), x,y,width,height ); + printf( "DoSetSize: name %s, x,y,w,h: %d,%d,%d,%d \n", GetName().c_str(), x,y,width,height ); */ if (m_resizing) return; /* I don't like recursions */ @@ -2890,6 +2890,13 @@ void wxWindow::DoGetClientSize( int *width, int *height ) const if (width) (*width) = m_width - dw; if (height) (*height) = m_height - dh; } + +/* + printf( "GetClientSize, name %s ", GetName().c_str() ); + if (width) printf( " width = %d", (*width) ); + if (height) printf( " height = %d", (*height) ); + printf( "\n" ); +*/ } void wxWindow::DoGetPosition( int *x, int *y ) const diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index cedfca99d5..97e19ac404 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -448,7 +448,7 @@ void wxFrame::Init() m_toolBarDetached = FALSE; m_insertInClientArea = TRUE; m_isFrame = TRUE; - m_isIconized = TRUE; + m_isIconized = FALSE; m_fsIsShowing = FALSE; m_themeEnabled = TRUE; } @@ -1228,7 +1228,11 @@ void wxFrame::SetIconizeState(bool iconize) { // this is not supposed to happen if we're called only from // gtk_frame_(un)map_callback! - wxFAIL_MSG( _T("unexpected call to SendIconizeEvent ignored") ); + + // RR: I don't understand this test. Upon startup, the frame is + // not iconized by default, it has just not been created + // yet. + ///wxFAIL_MSG( _T("unexpected call to SendIconizeEvent ignored") ); } } diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 1e58a816c7..657daceeb7 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2616,7 +2616,7 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags ) wxASSERT_MSG( (m_parent != NULL), wxT("wxWindow::SetSize requires parent.\n") ); /* - printf( "name %s, x,y,w,h: %d,%d,%d,%d \n", GetName().c_str(), x,y,width,height ); + printf( "DoSetSize: name %s, x,y,w,h: %d,%d,%d,%d \n", GetName().c_str(), x,y,width,height ); */ if (m_resizing) return; /* I don't like recursions */ @@ -2890,6 +2890,13 @@ void wxWindow::DoGetClientSize( int *width, int *height ) const if (width) (*width) = m_width - dw; if (height) (*height) = m_height - dh; } + +/* + printf( "GetClientSize, name %s ", GetName().c_str() ); + if (width) printf( " width = %d", (*width) ); + if (height) printf( " height = %d", (*height) ); + printf( "\n" ); +*/ } void wxWindow::DoGetPosition( int *x, int *y ) const -- 2.45.2