[gnome-shell] Require an explicit --xephyr option
- From: Owen Taylor <otaylor src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Require an explicit --xephyr option
- Date: Thu, 27 Aug 2009 19:34:52 +0000 (UTC)
commit 452e98e3bc490213b7be1bb7be6fd822df81f414
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Aug 27 14:07:46 2009 -0400
Require an explicit --xephyr option
Instead of starting Xephyr automatically, require --xephyr to be
passed explicitly.
This makes the operation easier to understand and has the benefit
of allowing running in Xephyr mode when some other window manager
(like gnome-shell!) is running. We also want to emphasize that
Xephyr is a development tool, and not a good preview of the
user-interface.
http://bugzilla.gnome.org/show_bug.cgi?id=592881
src/gnome-shell.in | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/src/gnome-shell.in b/src/gnome-shell.in
index ef15b95..a3bdad8 100644
--- a/src/gnome-shell.in
+++ b/src/gnome-shell.in
@@ -190,7 +190,9 @@ def start_shell():
else:
args = []
- args.extend(['mutter', '--mutter-plugins=' + plugin, '--replace'])
+ args.extend(['mutter', '--mutter-plugins=' + plugin])
+ if options.replace:
+ args.append('--replace')
if options.sync:
args.append('--sync')
return subprocess.Popen(args, env=env)
@@ -207,6 +209,8 @@ parser.add_option("", "--debug-command", metavar="COMMAND",
help="Command to use for debugging (defaults to 'gdb --args')")
parser.add_option("-v", "--verbose", action="store_true")
parser.add_option("", "--sync", action="store_true")
+parser.add_option("", "--xephyr", action="store_true",
+ help="Run a debugging instance inside Xephyr")
parser.add_option("", "--geometry", metavar="GEOMETRY",
help="Specify Xephyr screen geometry",
default="1024x768");
@@ -240,14 +244,6 @@ if gnome_panel_dbus:
else:
gnome_panel_pid = pidof("gnome-panel")
-# Run in Xephyr if gnome-panel is already running and the user didn't
-# specify --replace. Otherwise, run fullscreen
-if options.replace:
- run_in_xephyr = False
-else:
- run_in_xephyr = (metacity_pid != None or compiz_pid != None or
- gnome_panel_pid != None)
-
# Figure out whether or not to use GL_EXT_texture_from_pixmap. By default
# we use it iff we aren't running Xephyr, but we allow the user to
# explicitly disable it.
@@ -258,7 +254,7 @@ if 'GNOME_SHELL_DISABLE_TFP' in os.environ and \
use_tfp = False
else:
# tfp does not work correctly in Xephyr
- use_tfp = not run_in_xephyr
+ use_tfp = not options.xephyr
if options.verbose:
print "Starting shell"
@@ -274,14 +270,14 @@ if options.debug:
normal_exit = False
try:
- if run_in_xephyr:
+ if options.xephyr:
xephyr = start_xephyr()
# This makes us not grab the org.gnome.Panel name
os.environ['GNOME_SHELL_NO_REPLACE_PANEL'] = '1'
shell = start_shell()
else:
xephyr = None
- if gnome_panel_pid is not None:
+ if options.replace and gnome_panel_pid is not None:
kill_gnome_panel(gnome_panel_pid)
shell = start_shell()
@@ -320,7 +316,7 @@ finally:
if options.debug:
termios.tcsetattr(0, termios.TCSANOW, termattrs);
- if not run_in_xephyr and not normal_exit:
+ if not options.xephyr and options.replace and not normal_exit:
# Restart gnome-panel and window manager
# We don't want to start the new gnome-panel in the current
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]