[firstboot] Get the dimensions of the actual monitor (#800662)

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

 



---
 firstboot/interface.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/firstboot/interface.py b/firstboot/interface.py
index ce0ff50..d5eff3c 100644
--- a/firstboot/interface.py
+++ b/firstboot/interface.py
@@ -188,6 +188,16 @@ class Interface(object):
         dlg.destroy()
         os.system("/sbin/reboot")
 
+    def fit_window_to_screen(self):
+        # need this to get the monitor
+        self.win.show()
+
+        screen = self.win.get_screen()
+        monitor = screen.get_monitor_at_window(self.win.get_window())
+        geometry = screen.get_monitor_geometry(monitor)
+        self._x_size = geometry.width
+        self._y_size = geometry.height
+
     def createMainWindow(self):
         """Create and initialize the main window.  This includes switching to
            fullscreen mode if necessary, adding buttons, displaying artwork,
@@ -201,6 +211,8 @@ class Interface(object):
         # we don't set border width here so that the sidebar will meet
         # the edge of the screen
 
+        self.fit_window_to_screen()
+
         # Create a box that will hold all other widgets.
         self.mainHBox = gtk.HBox(False, 10)
 
-- 
1.7.5.4

_______________________________________________
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