[PATCH] Introduces matchbox window manager (needed for #520146)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
 
     setupGraphicalLinks()
 
     # now start up mini-wm
     try:
-        miniwm_pid = startMiniWM()
-        log.info("Started mini-wm")
+        wm_pid = startMatchboxWM()
+        log.info("Started matchbox-window-manager, pid %s." % (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
 
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index 217f997..47efa8a 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -174,14 +174,14 @@ PACKAGES="GConf2 NetworkManager ORBit2 acl anaconda
     libXi libXinerama libXmu libXpm libXrandr libXrender libXt libXtst
     libXxf86misc libacl libaio libart_lgpl libattr libbdevid libbdevid-python
     libbonobo libcurl libfontenc libidn libgcc
-    libglade2 libgnomecanvas libgcrypt libgpg-error libjpeg libnl
+    libglade2 libgnomecanvas libgcrypt libgpg-error libjpeg libmatchbox libnl
     libpng libselinux libselinux-python libsemanage
     libsemanage-python libsepol libssh2 libstdc++ libthai libtirpc libuser
     libuser-python libvolume_id libxcb libxkbfile libxml2 lklug-fonts 
     lohit-assamese-fonts lohit-bengali-fonts lohit-gujarati-fonts lohit-hindi-fonts
     lohit-kashmiri-fonts lohit-kannada-fonts lohit-maithili-fonts lohit-marathi-fonts
     lohit-oriya-fonts lohit-punjabi-fonts lohit-sindhi-fonts lohit-tamil-fonts
-    lohit-telugu-fonts lvm2 madan-fonts mdadm
+    lohit-telugu-fonts lvm2 madan-fonts matchbox-window-manager mdadm
     mesa-dri-drivers mkinitrd module-init-tools nash ncurses neon net-tools
     newt newt-python nfs-utils nspr nss nss-softokn ntfs-3g
     openldap openssh openssh-server
@@ -370,6 +370,7 @@ etc/im_palette.pal
 etc/imrc
 etc/iscsid.conf
 etc/man.config
+etc/matchbox
 etc/mke2fs.conf
 etc/netconfig
 etc/nsswitch.conf
@@ -501,6 +502,7 @@ usr/$LIBDIR/python?.?
 usr/$LIBDIR/rpm/rpmpopt
 usr/$LIBDIR/libiscsi.so*
 usr/$LIBDIR/libfreebl3.so
+usr/$LIBDIR/libmb.so*
 usr/$LIBDIR/libsoftokn3.so
 usr/$LIBDIR/libsqlite3.so*
 usr/$LIBDIR/xorg/modules
@@ -528,6 +530,7 @@ usr/bin/logger
 usr/bin/lsattr*
 usr/bin/lshal
 usr/bin/maketilo
+usr/bin/matchbox-window-manager
 usr/bin/md5sum
 usr/bin/mini-wm
 usr/bin/mkzimage
@@ -653,6 +656,7 @@ usr/share/locale/*/LC_MESSAGES/system-config-date.mo
 usr/share/locale/*/LC_MESSAGES/system-config-keyboard.mo
 usr/share/locale/*/LC_MESSAGES/zenity.mo
 usr/share/locale/locale.alias
+usr/share/matchbox/mbnoapp.xpm
 usr/share/pixmaps/comps/*.png
 usr/share/pixmaps/gnome-default-dlg.png
 usr/share/pixmaps/gnome-error.png
@@ -672,6 +676,7 @@ usr/share/terminfo/v/vt100-nav
 usr/share/terminfo/v/vt320
 usr/share/terminfo/v/vt320-w
 usr/share/terminfo/x/xterm
+usr/share/themes/Default/matchbox/*
 usr/share/xorg/extramodes
 usr/share/xorg/vesamodes
 usr/share/zenity
@@ -984,6 +989,14 @@ directory = /mnt/sysimage/etc
 directory = /mnt/sysimage/etc
 EOF
 
+# create plain theme for the matchbox window manager
+mkdir -p $DEST/usr/share/themes/anaconda/matchbox
+cat > $DEST/usr/share/themes/anaconda/matchbox/theme.xml <<EOF
+<?xml version="1.0"?>
+<theme name="anaconda" version="1.0" engine_version="1" >
+</theme>
+EOF
+
 sed -i 's|\(installforallkernels\) = 0|\1 = 1|' $DEST/etc/yum/pluginconf.d/fedorakmod.conf
 
 #
-- 
1.6.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux