From 40ff31b2af5cb397e504d899585041878fd57f28 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 3 Dec 2009 11:31:21 -0500 Subject: =?UTF-8?q?Bug=C2=A0603592=20-=20X11=20window=20roles=20should=20b?= =?UTF-8?q?e=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/e-shell.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/shell/e-shell.c b/shell/e-shell.c index 157e003799..ebef1c084a 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); -- cgit v1.2.3