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
This commit is contained in:
Olaf Lessenich 2025-08-19 23:28:15 +02:00 committed by David Yang
parent 2197650f1e
commit 1c18e87423
2 changed files with 10 additions and 1 deletions

View File

@ -702,7 +702,10 @@ class Guake(SimpleGladeApp):
# move the window even when in fullscreen-mode
log.debug("Moving window to: %r", window_rect)
self.window.move(window_rect.x, window_rect.y)
# Queue layout updates and defer positioning to prevent drift
self.window.queue_resize()
GLib.idle_add(lambda: self.window.move(window_rect.x, window_rect.y) and False)
# this works around an issue in fluxbox
if not self.fullscreen_manager.is_fullscreen():

View File

@ -0,0 +1,6 @@
fixes:
- |
Fixed window position drift during visibility toggles. The window would
gradually move down and sideways with each show/hide cycle. Window positioning
is now properly deferred until after widget layout is complete. #2184