summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-03-22 16:51:50 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-03-22 16:51:50 +0100
commit478a9293b7e3b2efcd64d80237a7c0f9b34e21ac (patch)
treeb29af1416b6a77ea9f36304b3c1d7ef3d109225e
parentcaa1f49279f2cf1b034a592d67c46b9df5428f65 (diff)
downloadpylock-478a9293b7e3b2efcd64d80237a7c0f9b34e21ac.tar
pylock-478a9293b7e3b2efcd64d80237a7c0f9b34e21ac.zip
Fix (?) window size
-rw-r--r--LockWindow.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/LockWindow.py b/LockWindow.py
index 2ead7be..d6f6ae3 100644
--- a/LockWindow.py
+++ b/LockWindow.py
@@ -52,6 +52,8 @@ class LockWindow(Gtk.Window):
self.realize()
self.get_window().set_override_redirect(True)
+ self.set_default_size(self.screen.get_width(), self.screen.get_height())
+
self.set_has_resize_grip(False)
builder = Gtk.Builder()
@@ -79,6 +81,7 @@ class LockWindow(Gtk.Window):
self.deviceManager = self.display.get_device_manager()
self.connect('map-event', self._grabDevices)
+ self.connect('configure-event', lambda w, e: self.get_window().move_resize(0, 0, self.screen.get_width(), self.screen.get_height()) and False)
def _logout(self):
self.promptEntry.set_sensitive(False)
@@ -130,8 +133,6 @@ class LockWindow(Gtk.Window):
self.messageLabel.set_label(message)
def _grabDevices(self, w, e):
- self.get_window().move_resize(0, 0, self.screen.get_width(), self.screen.get_height())
-
self.promptEntry.grab_focus()
for device in self.deviceManager.list_devices(Gdk.DeviceType.MASTER):
@@ -146,13 +147,6 @@ class LockWindow(Gtk.Window):
device.ungrab(Gdk.CURRENT_TIME)
def lock(self):
- #geom = Gdk.Geometry()
- #geom.min_width = self.screen.get_width()
- #geom.max_width = self.screen.get_width()
- #geom.min_height = self.screen.get_height()
- #geom.max_height = self.screen.get_height()
- #self.set_geometry_hints(self.overlay, geom, Gdk.WindowHints.MAX_SIZE)
-
self.show_all()
def unlock(self):