Skip to content

Fix unbounded X11 window size limits - #49

Merged
levovix0 merged 2 commits into
levovix0:masterfrom
elcritch:fix-x11-unbounded-size-limits
Sep 4, 2026
Merged

Fix unbounded X11 window size limits#49
levovix0 merged 2 commits into
levovix0:masterfrom
elcritch:fix-x11-unbounded-size-limits

Conversation

@elcritch

@elcritch elcritch commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

On some x11 desktops this essentially sets the window size to 1x1.

X11 interprets PMaxSize/PMinSize as active constraints; unlike other Siwin backends, it does not treat a zero dimension as an unbounded sentinel when the corresponding flag is present.

Clear the relevant size-hint flag when either requested dimension is non-positive, while preserving the stored Siwin minimum/maximum value. Positive dimensions still set the flag and native values. This prevents window managers from collapsing a window to its minimum size (and downstream Vulkan swapchains to 1×1) after an unbounded maximum is applied.

Adds deterministic XSizeHints tests covering positive minimum/maximum constraints and clearing each flag for an unbounded dimension.

Addresses elcritch/merenda#31

@levovix0
levovix0 merged commit b457b26 into levovix0:master Sep 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants