diff options
-rw-r--r-- | LockWindow.py | 12 |
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): |