]> Pileus Git - ~andy/gtk/commitdiff
Prevent hidden windows from being shown without gdk's control when
authorRichard Hult <richard@imendio.com>
Sun, 24 Feb 2008 17:51:22 +0000 (17:51 +0000)
committerRichard Hult <rhult@src.gnome.org>
Sun, 24 Feb 2008 17:51:22 +0000 (17:51 +0000)
2008-02-24  Richard Hult  <richard@imendio.com>

* gdk/quartz/GdkQuartzWindow.c: Prevent hidden windows from being
shown without gdk's control when clicking the dock icon.

svn path=/trunk/; revision=19638

ChangeLog
gdk/quartz/GdkQuartzWindow.c

index b13f6487dac76686ff86eb2bb1f545f9691c133e..69c6d360f3af10ac990937cfa666e6837e98d831 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-24  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/GdkQuartzWindow.c: Prevent hidden windows from being
+       shown without gdk's control when clicking the dock icon.
+
 2008-02-24  Richard Hult  <richard@imendio.com>
 
        * gdk/quartz/gdkprivate-quartz.h:
index 95cf0285677688b73959653837735330e1f1666a..3f1681511046a9fa727cb1b59a76ae8d2199c9b4 100644 (file)
 
 -(void)windowDidBecomeMain:(NSNotification *)aNotification
 {
-  GdkWindow *window;
+  GdkWindow *window = [[self contentView] gdkWindow];
+
+  if (![self isVisible])
+    {
+      /* Note: This is a hack needed because for unknown reasons, hidden
+       * windows get shown when clicking the dock icon when the application
+       * is not already active.
+       */
+      [self orderOut:nil];
+      return;
+    }
 
-  window = [[self contentView] gdkWindow];
   _gdk_quartz_window_did_become_main (window);
 }