gtk+ r19638 - in trunk: . gdk/quartz



Author: rhult
Date: Sun Feb 24 17:51:22 2008
New Revision: 19638
URL: http://svn.gnome.org/viewvc/gtk+?rev=19638&view=rev

Log:
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.


Modified:
   trunk/ChangeLog
   trunk/gdk/quartz/GdkQuartzWindow.c

Modified: trunk/gdk/quartz/GdkQuartzWindow.c
==============================================================================
--- trunk/gdk/quartz/GdkQuartzWindow.c	(original)
+++ trunk/gdk/quartz/GdkQuartzWindow.c	Sun Feb 24 17:51:22 2008
@@ -79,9 +79,18 @@
 
 -(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);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]