Repository navigation
Fyne copy: windows fit the screen's work area (#512) - #564
Open
MopigamesYT wants to merge 2 commits into
Open
MopigamesYT wants to merge 2 commits into
MopigamesYT wants to merge 2 commits into
Conversation
The first window is 1180×760 whatever the screen: on a 1280×800 screen with a 54 px panel its bottom went under the panel. Resize now keeps a window within the work area of its screen once the window exists (its scale and screen known), or within nine tenths of the screen where the platform gives no smaller work area. This covers the first window, new windows and the sizes restored from the last run. Never enlarged. Tests: TestFitArea (glfw driver). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tried on Plasma Wayland (linux-test VM, native Wayland build): the compositor kept the size the window was created with (1180×760), so the later Resize to fit was not applied, and the canvas, laid out for 1152×720, was stretched over the larger surface. The window is now created within the primary screen's work area as well; the X11 build was right already (1180×746). Tests: TestFitArea; checked on the VM with both builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Tried on the linux-test VM (Kubuntu 26.04, Plasma 6 Wayland, 1280×800, 54 px panel). The work area is 1280×746.
The VM caught a problem with the first commit on native Wayland. The compositor kept the size the window was created with, so the later resize was ignored, and the canvas, laid out for 1152×720, was stretched over the 1180×760 surface. 2411627 creates the window within the work area as well. Both builds are now right on the VM. On Wayland, GLFW reports no work area, so the fallback is used: a tenth of the screen left around the window. Assisted-by: Claude Opus 5.5 medium |
tpm28
approved these changes
Nov 18, 2026
This branch has not been deployed
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.
Closes #512
What changed
internal/driver/glfw),Resizekeeps a window within the work area of its screen once the window exists, when its screen and scale are known. The work area is GLFW'sGetWorkarea: the screen less its panels.third_party/fyne/1LOOP.mdwith the other changes to the copy.Screenshots
Taken on the linux-test VM (Plasma 6 Wayland, 1280×800, 54 px panel).
dev(X11)Checked here:
go testfor the glfw driver:TestFitAreacovers the 54 px panel case, a large screen, no work area reported, and never enlarging.go test ./internal/ui,go build ./..., andgo vetfor WebAssembly.Run on the linux-test VM's 1280×800 screen with a 54 px panel, X11 and native Wayland builds (screenshots above).
Limit: the work area counts the window manager's title bar, and the window's size doesn't. A decorated window can therefore still reach about one title bar's height under a panel. 1loop's own title bar isn't affected.
Assisted-by: Claude Opus 5.5 medium
🤖 Generated with Claude Code