[27544] in Source-Commits

home help back first fref pref prev next nref lref last post

lightdm-config commit: Fix background window repositioning bug

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Mon Dec 16 17:07:11 2013

Date: Mon, 16 Dec 2013 17:07:04 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201312162207.rBGM743J016608@drugstore.mit.edu>
To: source-commits@MIT.EDU

https://github.com/mit-athena/lightdm-config/commit/4a754c258783c7385562bb89d43660a1d2a453a9
commit 4a754c258783c7385562bb89d43660a1d2a453a9
Author: Jonathan Reed <jdreed@mit.edu>
Date:   Mon Dec 16 17:05:35 2013 -0500

    Fix background window repositioning bug
    
    The background window can be repositioned (Trac: #1247)
    and it should not be.  Fix this hackishly.

 debian/changelog                    |    6 +++++-
 debian/debathena-lightdm-greeter    |    6 ++++++
 debian/debathena-lightdm-greeter.ui |    1 +
 3 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3ea7e5d..0fbc566 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,13 @@
 debathena-lightdm-config (1.12) unstable; urgency=low
 
+  [ Alexander Chernyakhovsky ]
   * Add git-buildpackage configuration
   * Set source format to 3.0 (native)
 
- -- Alexander Chernyakhovsky <achernya@mit.edu>  Sun, 29 Sep 2013 05:43:21 -0400
+  [ Jonathan Reed ]
+  * Fix background window bug (Trac: #1247)
+
+ -- Jonathan Reed <jdreed@mit.edu>  Mon, 16 Dec 2013 17:03:57 -0500
 
 debathena-lightdm-config (1.11) unstable; urgency=low
 
diff --git a/debian/debathena-lightdm-greeter b/debian/debathena-lightdm-greeter
index 5dda922..e4b8efa 100755
--- a/debian/debathena-lightdm-greeter
+++ b/debian/debathena-lightdm-greeter
@@ -259,6 +259,7 @@ class DebathenaGreeter:
     def initBackgroundWindow(self):
         # The background image
         self.winBg = self.builder.get_object("winBg")
+        self.winBg.connect("configure-event", self.winBg_configure_event)
         self.imgBg = self.builder.get_object("imgBg")
         try:
             bg_pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.backgroundImageFile)
@@ -390,6 +391,11 @@ class DebathenaGreeter:
         if evt_type == Gio.FileMonitorEvent.UNMOUNTED:
             self.afsAvailable = False
 
+    def winBg_configure_event(self, widget, evt):
+        if (int(evt.x) != 0) or (int(evt.y) != 0):
+            # Prevent glasgall and achernya from moving the background window
+            self.winBg.move(0,0)
+
     def _file_changed(self, monitor, file1, file2, evt_type):
         if evt_type == Gio.FileMonitorEvent.CREATED:
             self.loginNotebook.set_current_page(1)
diff --git a/debian/debathena-lightdm-greeter.ui b/debian/debathena-lightdm-greeter.ui
index 387aa6f..5246b9a 100644
--- a/debian/debathena-lightdm-greeter.ui
+++ b/debian/debathena-lightdm-greeter.ui
@@ -19,6 +19,7 @@
   <object class="GtkWindow" id="winBg">
     <property name="can_focus">False</property>
     <property name="resizable">False</property>
+    <property name="window_position">center</property>
     <property name="skip_taskbar_hint">True</property>
     <property name="skip_pager_hint">True</property>
     <property name="accept_focus">False</property>

home help back first fref pref prev next nref lref last post