aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-12-04 00:31:21 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-12-04 00:31:21 +0800
commit40ff31b2af5cb397e504d899585041878fd57f28 (patch)
tree5c91f0ef21f10d0d560dbaa9145da7cf14a270a4
parentba05eccc8d0595fd229a25b5a62f302abe7ef479 (diff)
downloadgsoc2013-evolution-40ff31b2af5cb397e504d899585041878fd57f28.tar
gsoc2013-evolution-40ff31b2af5cb397e504d899585041878fd57f28.tar.gz
gsoc2013-evolution-40ff31b2af5cb397e504d899585041878fd57f28.tar.bz2
gsoc2013-evolution-40ff31b2af5cb397e504d899585041878fd57f28.tar.lz
gsoc2013-evolution-40ff31b2af5cb397e504d899585041878fd57f28.tar.xz
gsoc2013-evolution-40ff31b2af5cb397e504d899585041878fd57f28.tar.zst
gsoc2013-evolution-40ff31b2af5cb397e504d899585041878fd57f28.zip
BugĀ 603592 - X11 window roles should be set
-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);