]> git.saurik.com Git - wxWidgets.git/commitdiff
make sure ShowWithoutActivating only takes effect once
authorPaul Cornett <paulcor@bullseye.com>
Sat, 31 Oct 2009 16:29:19 +0000 (16:29 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Sat, 31 Oct 2009 16:29:19 +0000 (16:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/toplevel.cpp

index e0118f9dea15ac4c2ce3e877b65590127425c702..df40a213c3714397b760c700850416669749357d 100644 (file)
@@ -358,6 +358,8 @@ gtk_frame_map_callback( GtkWidget*,
         eventShow.SetEventObject(win);
         win->GetEventHandler()->ProcessEvent(eventShow);
     }
+    // restore focus-on-map setting in case ShowWithoutActivating() was called
+    gtk_window_set_focus_on_map(GTK_WINDOW(win->m_widget), true);
     return false;
 }
 }
@@ -891,8 +893,11 @@ bool wxTopLevelWindowGTK::Show( bool show )
 
 void wxTopLevelWindowGTK::ShowWithoutActivating()
 {
-    gtk_window_set_focus_on_map(GTK_WINDOW(m_widget), false);
-    Show(true);
+    if (!m_isShown)
+    {
+        gtk_window_set_focus_on_map(GTK_WINDOW(m_widget), false);
+        Show(true);
+    }
 }
 
 void wxTopLevelWindowGTK::Raise()