[gnome-music/wip/mschraal/gtk4-v3: 117/192] windowplacement: Remove window move logic
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4-v3: 117/192] windowplacement: Remove window move logic
- Date: Sat, 5 Feb 2022 20:09:38 +0000 (UTC)
commit e914a66603601dedf5cea0cee77e8eaad9bd612f
Author: Jean Felder <jfelder src gnome org>
Date: Wed Feb 2 23:23:36 2022 +0100
windowplacement: Remove window move logic
With Gtk4, gtk_window_move support has been removed, mainly because it
does not work under Wayland.
gnomemusic/windowplacement.py | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/gnomemusic/windowplacement.py b/gnomemusic/windowplacement.py
index 2eb5bff74..9ead8149f 100644
--- a/gnomemusic/windowplacement.py
+++ b/gnomemusic/windowplacement.py
@@ -58,29 +58,19 @@ class WindowPlacement(GObject.GObject):
and isinstance(size_setting[1], int)):
self._window.resize(size_setting[0], size_setting[1])
- position_setting = self._settings.get_value('window-position')
- if (len(position_setting) == 2
- and isinstance(position_setting[0], int)
- and isinstance(position_setting[1], int)):
- self._window.move(position_setting[0], position_setting[1])
-
if self._settings.get_value('window-maximized'):
self._window.maximize()
def _on_configure_event(self, widget, event):
if self._window_placement_update_timeout is None:
self._window_placement_update_timeout = GLib.timeout_add(
- 500, self._store_size_and_position, widget)
+ 500, self._store_size, widget)
- def _store_size_and_position(self, widget):
+ def _store_size(self, widget):
size = widget.get_size()
self._settings.set_value(
'window-size', GLib.Variant('ai', [size[0], size[1]]))
- position = widget.get_position()
- self._settings.set_value(
- 'window-position', GLib.Variant('ai', [position[0], position[1]]))
-
GLib.source_remove(self._window_placement_update_timeout)
self._window_placement_update_timeout = None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]