[evolution] Bug 603592 - X11 window roles should be set



commit 40ff31b2af5cb397e504d899585041878fd57f28
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Dec 3 11:31:21 2009 -0500

    Bug 603592 - X11 window roles should be set

 shell/e-shell.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 157e003..ebef1c0 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -1446,6 +1446,7 @@ e_shell_watch_window (EShell *shell,
                       GtkWindow *window)
 {
 	GList *list;
+	gchar *role;
 
 	g_return_if_fail (E_IS_SHELL (shell));
 	g_return_if_fail (GTK_IS_WINDOW (window));
@@ -1461,6 +1462,15 @@ e_shell_watch_window (EShell *shell,
 
 	unique_app_watch_window (UNIQUE_APP (shell), window);
 
+	/* We use the window's own type name and memory
+	 * address to form a unique window role for X11. */
+	role = g_strdup_printf (
+		"%s-%" G_GINTPTR_FORMAT,
+		G_OBJECT_TYPE_NAME (window),
+		(gintptr) window);
+	gtk_window_set_role (window, role);
+	g_free (role);
+
 	g_signal_connect_swapped (
 		window, "delete-event",
 		G_CALLBACK (shell_window_delete_event_cb), shell);



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