Do nothing in wxTLW::Show() if t already is
authorRobert Roebling <robert@roebling.de>
Tue, 1 Aug 2006 16:39:31 +0000 (16:39 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 1 Aug 2006 16:39:31 +0000 (16:39 +0000)
    shown.
  Don't call gtk_widget_set_uposition() there
    anymore, since it is useless, deprectased
    and causes surplus move events.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/toplevel.cpp

index bf4cec07be2436a357cae737f8668b93220a3755..467d67ab53d7c4578b71e3982137224956e33970 100644 (file)
@@ -795,6 +795,9 @@ bool wxTopLevelWindowGTK::Show( bool show )
 {
     wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
 
+    if (show == IsShown())
+        return true;
+
     if (show && !m_sizeSet)
     {
         /* by calling GtkOnSize here, we don't have to call
@@ -805,8 +808,11 @@ bool wxTopLevelWindowGTK::Show( bool show )
         GtkOnSize( m_x, m_y, m_width, m_height );
     }
 
-    if (show)
-        gtk_widget_set_uposition( m_widget, m_x, m_y );
+    // This seems no longer to be needed and the call
+    // itself is deprecated.
+    //
+    //if (show)
+    //    gtk_widget_set_uposition( m_widget, m_x, m_y );
 
     return wxWindow::Show( show );
 }