Skip to content

Commit 1c18e87

Browse files
xaiDavidy22
authored andcommitted
Fix window position drift during visibility toggles
Defer window positioning using queue_resize() and GLib.idle_add() to ensure all widget layout calculations are complete before moving the window. Fixes #2184 sem-ver: bugfix
1 parent 2197650 commit 1c18e87

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

guake/guake_app.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,10 @@ def show(self):
702702

703703
# move the window even when in fullscreen-mode
704704
log.debug("Moving window to: %r", window_rect)
705-
self.window.move(window_rect.x, window_rect.y)
705+
706+
# Queue layout updates and defer positioning to prevent drift
707+
self.window.queue_resize()
708+
GLib.idle_add(lambda: self.window.move(window_rect.x, window_rect.y) and False)
706709

707710
# this works around an issue in fluxbox
708711
if not self.fullscreen_manager.is_fullscreen():
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
fixes:
3+
- |
4+
Fixed window position drift during visibility toggles. The window would
5+
gradually move down and sideways with each show/hide cycle. Window positioning
6+
is now properly deferred until after widget layout is complete. #2184

0 commit comments

Comments
 (0)