[26615] in Source-Commits
/svn/athena r25655 - trunk/debathena/config/lightdm-config/debian
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Tue Jul 24 18:21:34 2012
Date: Tue, 24 Jul 2012 18:21:32 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201207242221.q6OMLWZV026717@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jdreed
Date: 2012-07-24 18:21:32 -0400 (Tue, 24 Jul 2012)
New Revision: 25655
Modified:
trunk/debathena/config/lightdm-config/debian/changelog
trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter
Log:
In lightdm-config:
* Support multiple monitors (Trac: #1031)
Modified: trunk/debathena/config/lightdm-config/debian/changelog
===================================================================
--- trunk/debathena/config/lightdm-config/debian/changelog 2012-07-24 20:25:40 UTC (rev 25654)
+++ trunk/debathena/config/lightdm-config/debian/changelog 2012-07-24 22:21:32 UTC (rev 25655)
@@ -12,8 +12,9 @@
conditionally returned True
* Deal more gracefully with a missing background image
* Move greeter to /usr/lib/debathena-lightdm-config
+ * Support multiple monitors (Trac: #1031)
- -- Jonathan Reed <jdreed@mit.edu> Wed, 18 Jul 2012 12:01:54 -0400
+ -- Jonathan Reed <jdreed@mit.edu> Tue, 24 Jul 2012 18:21:25 -0400
debathena-lightdm-config (1.3) unstable; urgency=low
Modified: trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter
===================================================================
--- trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter 2012-07-24 20:25:40 UTC (rev 25654)
+++ trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter 2012-07-24 22:21:32 UTC (rev 25655)
@@ -118,8 +118,11 @@
# Save the screen size for various window operations
defaultScreen = Gdk.Screen.get_default()
- self.screenSize = (defaultScreen.width(), defaultScreen.height())
-
+ # Kids these days have too many monitors
+ self.monitorGeometry = defaultScreen.get_monitor_geometry(defaultScreen.get_primary_monitor())
+ # Don't use this for window centering calculations
+ self.screenSize = (self.monitorGeometry.x + self.monitorGeometry.width,
+ self.monitorGeometry.y + self.monitorGeometry.height)
self.get_workstation_information()
# Load the UI and get objects we care about
@@ -229,7 +232,7 @@
self.builder.get_object('lblMotd').set_markup(motdTxt.strip())
width, height = self.winMotd.get_size()
self.winMotd.set_gravity(Gdk.Gravity.SOUTH)
- self.winMotd.move((self.screenSize[0] - width )/ 2, self.screenSize[1] - height - 10)
+ self.winMotd.move(self.monitorGeometry.x + ((self.monitorGeometry.width - width )/ 2), self.screenSize[1] - height - 10)
self.winMotd.show_all()
def initBackgroundWindow(self):