Repository navigation
Conversation
…isibility RectCalculator.set_final_window_rect() was only applied on show(). Adding/removing a tab (notebook.show_all()) let KWin/XWayland shrink the window to the VTE natural width, and a fresh map was snapped back to it asynchronously. Re-assert the configured size after tab changes, floor the minimum width, and watch configure events for late snap-backs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On KDE Plasma (KWin) Wayland sessions, where Guake runs as an XWayland client (
GDK_BACKEND=x11), the main window does not keep its configured width:Root cause:
RectCalculator.set_final_window_rect()(guake/utils.py) is only applied onshow(). Adding/removing a tab callsnotebook.show_all(), which lets GTK/KWin renegotiate the toplevel to its natural size, and nothing re-asserts the configured size. KWin additionally forces a narrow size on fresh maps aftershow()returns, so pre-map resizes alone do not stick (verified withconfigure-eventtracing: correct 1920px request logged, window still lands on 1280px).Changes
guake/notebook.py: re-apply the final window rect (deferred viaGLib.idle_add) after a tab is added (new_page()) or removed (remove_page()) while the window is visible.guake/utils.py: floor the toplevel minimum width to the configured width inset_final_window_rect()(cleared on the maximize path) so the compositor cannot shrink below it.guake/guake_app.py: inshow(), set the rect as the WM map-time default size, flip the DOCK->NORMAL type hint before mapping instead of after, and re-assert the size after mapping; added a debouncedconfigure-eventwatchdog that restores the enforced width on large unexpected shrinks (skipped when hidden/fullscreen).guake/gsettings.py: keep the enforced width in sync when size/alignment settings change.Testing
Manually verified on Kubuntu-style setup (Plasma 6 Wayland, single 1920x1080 output,
window-width=100) withxwininfo: width stays at 1920px across new tabs, tab closes and hide/show cycles.py_compilepasses on all touched files.