gimp r26917 - in trunk: . app/gui



Author: tml
Date: Wed Sep 10 20:00:53 2008
New Revision: 26917
URL: http://svn.gnome.org/viewvc/gimp?rev=26917&view=rev

Log:
2008-09-10  Tor Lillqvist  <tml novell com>

	* app/gui/gui-unique.c (gui_unique_win32_exit): Destroy the proxy
	window here so that gimp_unique_win32_open() in app/unique.c won't
	find it. This is important especially in a developer version where
	the debug output window might be left open and the proxy window
	still existing for a long time after the GTK+ main loop of the
	GIMP GUI has finished. Thanks to Michael Schumacher for pointing
	this out.

	There is still a small race window here after GIMP has begun
	closing down its GUI in gui_exit_callback() and before the proxy
	window has gone away. If another GIMP starts during that interval,
	it will find the proxy window and send it a message, which will
	then either be ignored, or the proxy window will have been
	destroyed before it gets the message. Let's ignore that. There is
	a much wider time window during which multiple GIMP instances may
	be started during GIMP startup anyway.



Modified:
   trunk/ChangeLog
   trunk/app/gui/gui-unique.c

Modified: trunk/app/gui/gui-unique.c
==============================================================================
--- trunk/app/gui/gui-unique.c	(original)
+++ trunk/app/gui/gui-unique.c	Wed Sep 10 20:00:53 2008
@@ -55,6 +55,7 @@
 static void gui_unique_win32_exit  (void);
 
 static Gimp            *unique_gimp      = NULL;
+static HWND             proxy_window     = NULL;          
 #endif
 
 
@@ -231,10 +232,10 @@
 
   RegisterClassW (&wc);
 
-  CreateWindowExW (0,
-		   GIMP_UNIQUE_WIN32_WINDOW_CLASS,
-		   GIMP_UNIQUE_WIN32_WINDOW_NAME,
-		   WS_POPUP, 0, 0, 1, 1, NULL, NULL, wc.hInstance, NULL);
+  proxy_window = CreateWindowExW (0,
+				  GIMP_UNIQUE_WIN32_WINDOW_CLASS,
+				  GIMP_UNIQUE_WIN32_WINDOW_NAME,
+				  WS_POPUP, 0, 0, 1, 1, NULL, NULL, wc.hInstance, NULL);
 }
 
 static void
@@ -243,6 +244,8 @@
   g_return_if_fail (GIMP_IS_GIMP (unique_gimp));
 
   unique_gimp = NULL;
+
+  DestroyWindow (proxy_window);
 }
 
 



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