[gnome-shell] Bug 589260 - Don't replace panel in Xephyr mode
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Bug 589260 - Don't replace panel in Xephyr mode
- Date: Wed, 29 Jul 2009 21:47:46 +0000 (UTC)
commit 66e48da7cb98e43a42434f3b6e67dfc1dfda5d14
Author: Colin Walters <walters verbum org>
Date: Wed Jul 29 15:05:05 2009 -0400
Bug 589260 - Don't replace panel in Xephyr mode
Avoid grabbing the org.gnome.Panel name if we're running in
Xephyr, since that affects the main desktop.
src/gnome-shell.in | 2 ++
src/shell-global.c | 24 ++++++++++++++----------
2 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/src/gnome-shell.in b/src/gnome-shell.in
old mode 100755
new mode 100644
index eccea6c..9622029
--- a/src/gnome-shell.in
+++ b/src/gnome-shell.in
@@ -273,6 +273,8 @@ if options.debug:
try:
if run_in_xephyr:
shell = start_xephyr()
+ # This makes us not grab the org.gnome.Panel name
+ os.environ['GNOME_SHELL_NO_REPLACE_PANEL'] = '1'
start_shell()
else:
if gnome_panel_pid is not None:
diff --git a/src/shell-global.c b/src/shell-global.c
index 0c70e30..575956c 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -741,18 +741,22 @@ shell_global_grab_dbus_service (ShellGlobal *global)
exit (0);
}
- /* Also grab org.gnome.Panel to replace any existing panel process */
- if (!dbus_g_proxy_call (bus, "RequestName", &error,
- G_TYPE_STRING, "org.gnome.Panel",
- G_TYPE_UINT, DBUS_NAME_FLAG_REPLACE_EXISTING | DBUS_NAME_FLAG_DO_NOT_QUEUE,
- G_TYPE_INVALID,
- G_TYPE_UINT, &request_name_result,
- G_TYPE_INVALID))
+ /* Also grab org.gnome.Panel to replace any existing panel process,
+ * unless a special environment variable is passed. The environment
+ * variable is used by the gnome-shell (no --replace) launcher in
+ * Xephyr */
+ if (!g_getenv ("GNOME_SHELL_NO_REPLACE_PANEL"))
{
- g_print ("failed to acquire org.gnome.Panel: %s\n", error->message);
- exit (1);
+ if (!dbus_g_proxy_call (bus, "RequestName", &error, G_TYPE_STRING,
+ "org.gnome.Panel", G_TYPE_UINT,
+ DBUS_NAME_FLAG_REPLACE_EXISTING | DBUS_NAME_FLAG_DO_NOT_QUEUE,
+ G_TYPE_INVALID, G_TYPE_UINT,
+ &request_name_result, G_TYPE_INVALID))
+ {
+ g_print ("failed to acquire org.gnome.Panel: %s\n", error->message);
+ exit (1);
+ }
}
-
g_object_unref (bus);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]