SF.net SVN: geany:[3703] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Wed Apr 8 16:06:26 UTC 2009


Revision: 3703
          http://geany.svn.sourceforge.net/geany/?rev=3703&view=rev
Author:   eht16
Date:     2009-04-08 16:06:25 +0000 (Wed, 08 Apr 2009)

Log Message:
-----------
When opening files from a remote instance on X11, set the window server time to encourage window managers to pop up the main window (related to #2735467 and #2276179).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/socket.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-04-08 12:47:45 UTC (rev 3702)
+++ trunk/ChangeLog	2009-04-08 16:06:25 UTC (rev 3703)
@@ -1,3 +1,11 @@
+2009-04-08  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/socket.c:
+   When opening files from a remote instance on X11, set the window
+   server time to encourage window managers to pop up the main window
+   (related to #2735467 and #2276179).
+
+
 2009-04-08  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
 
  * src/ui_utils.h, src/utils.h, src/ui_utils.c:

Modified: trunk/src/socket.c
===================================================================
--- trunk/src/socket.c	2009-04-08 12:47:45 UTC (rev 3702)
+++ trunk/src/socket.c	2009-04-08 16:06:25 UTC (rev 3703)
@@ -76,6 +76,10 @@
 #include <unistd.h>
 #include <fcntl.h>
 
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+#endif
+
 #include "main.h"
 #include "socket.h"
 #include "document.h"
@@ -555,8 +559,16 @@
 		}
 #endif
 	}
+
 	if (popup)
 	{
+#ifdef GDK_WINDOWING_X11
+		/* Set the proper interaction time on the window. This seems necessary to make
+		 * gtk_window_present() really bring the main window into the foreground on some
+		 * window managers like Gnome's metacity.
+		 * Code taken from Gedit. */
+		gdk_x11_window_set_user_time(window->window, gdk_x11_get_server_time(window->window));
+#endif
 		gtk_window_present(GTK_WINDOW(window));
 #ifdef G_OS_WIN32
 		gdk_window_show(window->window);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list