]> git.saurik.com Git - wxWidgets.git/commitdiff
wxTopLevelWindow::GetClientSize() returns 0x0 when the window is minimized under...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 Feb 2007 00:27:26 +0000 (00:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 Feb 2007 00:27:26 +0000 (00:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
docs/latex/wx/window.tex
src/gtk/toplevel.cpp

index 8acfbae8a25f2125569a3523ed802f2b2e24682b..f74cf55783429c81f1fd7fab7b8c38ed61458009 100644 (file)
@@ -32,6 +32,7 @@ wxGTK:
 - Implemented support for underlined fonts in wxStaticText
 - wxTopLevelWindow::SetSizeHints size increments now work
 - wxTopLevelWindow::GetSize() returns the size including the WM decorations
 - Implemented support for underlined fonts in wxStaticText
 - wxTopLevelWindow::SetSizeHints size increments now work
 - wxTopLevelWindow::GetSize() returns the size including the WM decorations
+- wxTopLevelWindow::GetClientSize() returns 0x0 when the window is minimized
 
 wxMSW:
 
 
 wxMSW:
 
index 1271cec6e60ddc71d2dd772bccf73936490d7b7e..6983c824cf1dc4d11f3399af705a63809cb7b3c1 100644 (file)
@@ -873,6 +873,9 @@ Returns the size of the window `client area' in pixels. The client area is the
 area which may be drawn on by the programmer, excluding title bar, border,
 scrollbars, etc.
 
 area which may be drawn on by the programmer, excluding title bar, border,
 scrollbars, etc.
 
+Note that if this window is a top-level one and it is currently minimized, the
+return size is empty (both width and height are $0$).
+
 \wxheading{Parameters}
 
 \docparam{width}{Receives the client width in pixels.}
 \wxheading{Parameters}
 
 \docparam{width}{Receives the client width in pixels.}
index 3d4a155fc78828e730baa08ae9e4dbccae7e6484..062f13429a2bb791cc1619dceeecae560e6eeef9 100644 (file)
@@ -972,6 +972,18 @@ void wxTopLevelWindowGTK::DoGetSize(int *width, int *height) const
 
 void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const
 {
 
 void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const
 {
+    if ( IsIconized() )
+    {
+        // for consistency with wxMSW, client area is supposed to be empty for
+        // the iconized windows
+        if ( width )
+            *width = 0;
+        if ( height )
+            *height = 0;
+
+        return;
+    }
+
     wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
 
     if (height)
     wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
 
     if (height)