Introduces matchbox window manager (needed for #520146)
We need a solid window manager to be able to open and close the
nm-connection-editor window.
---
anaconda | 38 +++++++++++++++++++++++++++-----------
scripts/upd-instroot | 17 +++++++++++++++--
2 files changed, 42 insertions(+), 13 deletions(-)
diff --git a/anaconda b/anaconda
index 6b33988..198b5c1 100755
--- a/anaconda
+++ b/anaconda
@@ -36,7 +36,7 @@ from tempfile import mkstemp
# keep up with process ID of miniwm if we start it
-miniwm_pid = None
+wm_pid = None
# Make sure messages sent through python's warnings module get logged.
def AnacondaShowWarning(message, category, filename, lineno, file=sys.stderr, line=None):
@@ -67,22 +67,38 @@ def startMiniWM(root='/'):
return childpid
+def startMatchboxWM():
+ childpid = os.fork()
+ if not childpid:
+ cmd = '/usr/bin/matchbox-window-manager'
+ if not os.access(cmd, os.X_OK):
+ log.error("Unable to find the window manager binary.")
+ sys.exit(1)
+ args = [cmd,
+ '-display', ':1',
+ '-use_titlebar', 'no',
+ '-theme', 'anaconda']
+ os.execv(args[0], args)
+ log.error("The window manager execution has failed.")
+ sys.exit (1)
+ return childpid
+
# function to handle X startup special issues for anaconda
def doStartupX11Actions(runres="800x600"):
- global miniwm_pid
+ global wm_pid
except:
- miniwm_pid = None
- log.error("Unable to start mini-wm")
+ wm_pid = None
+ log.error("Unable to start the window manager.")
- if miniwm_pid is not None:
+ if wm_pid is not None:
import xutils
import gtk
@@ -103,12 +119,12 @@ def doStartupX11Actions(runres="800x600"):
raise RuntimeError, "X server failed to start"
def doShutdownX11Actions():
- global miniwm_pid
+ global wm_pid
- if miniwm_pid is not None:
+ if wm_pid is not None:
try:
- os.kill(miniwm_pid, 15)
- os.waitpid(miniwm_pid, 0)
+ os.kill(wm_pid, 15)
+ os.waitpid(wm_pid, 0)
except:
pass