[firstboot] Let WM place the window (#821077)

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

 



From: "Brian C. Lane" <bcl@xxxxxxxxxx>

Some window managers take a bit of time to be ready to use. With KDE
this was causing the screen to have its top left corner centered instead
of filling the screen depending on who won the race.

This fix doesn't try to center the window, it sets the size to match the
screen and lets the WM decide where to put it.

This has been tested by forcing the race condition with a 10s sleep
before starting the wm. This consistently reproduced the problem and the
fix consistently works.
---
 firstboot/interface.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/firstboot/interface.py b/firstboot/interface.py
index d5eff3c..58965c2 100644
--- a/firstboot/interface.py
+++ b/firstboot/interface.py
@@ -197,6 +197,8 @@ class Interface(object):
         geometry = screen.get_monitor_geometry(monitor)
         self._x_size = geometry.width
         self._y_size = geometry.height
+        logging.info("Setting size to %sx%s" % (self._x_size, self._y_size))
+        self.win.set_size_request(self._x_size, self._y_size)
 
     def createMainWindow(self):
         """Create and initialize the main window.  This includes switching to
@@ -206,7 +208,7 @@ class Interface(object):
         """
         # Create the initial window and a vbox to fill it with.
         self.win = gtk.Window()
-        self.win.set_position(gtk.WIN_POS_CENTER)
+        self.win.set_position(gtk.WIN_POS_NONE)
         self.win.set_decorated(False)
         # we don't set border width here so that the sidebar will meet
         # the edge of the screen
-- 
1.7.7.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