aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/e-shell.c10
1 files changed, 10 insertions, 0 deletions
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);