Window ignores the size in the compositor's first configure, so a tiled or maximized window starts at its constructor size #166
Labels
No labels
claude:blocked
claude:done
claude:failed
claude:in-progress
claude:ready
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Catcrafts/Crafter.Graphics#166
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
xdg_surface_handle_configureapplies a configure's size only once the window is configured, so the size in the first configure, the one the constructor waits for, is never used: the swapchain and the viewport are made from the constructor'swidthandheight, whatever the compositor asked for. Line numbers refer to670df31.Details
implementations/Crafter.Graphics-Window.cpp:1761-1768:xdg_toplevel_configurestores the size inpendingLogicalWidth/pendingLogicalHeight.:1781-1799:xdg_surface_handle_configureresizes only insideif (window->configured), then setsconfigured. For the first configure it only sets the flag.:381: the constructor dispatches untilconfigured, and nothing after the loop reads the pending size: the viewport destination (:395) andCreateSwapchain(:531) take the constructor's arguments.A compositor with a size in mind says so in that first configure: a tiling compositor's tile, a maximized or fullscreen start, a window rule. The window maps at its own size instead and keeps it until a later configure carries a size, which the compositor need not send. For a maximized start that also breaks xdg-shell's rule that the configured geometry be obeyed.
Not reproduced. On KWin 6.8.0 the first configure of a new toplevel is
(0, 0)(seen withWAYLAND_DEBUG=client), meaning no preference, for which the constructor's size is the right one.Suggested fix
After the wait loop, when the configure carried a size, set
widthandheightfrom the pending logical size timesscalebefore the viewport and the swapchain are made; the constructor's arguments stay the size for a compositor without a preference. With the fix suggested in #165, which keeps the logical size as state, the first configure would simply set that state.