Repository navigation
Conversation
With GSBackHandlesWindowDecorations (or GSX11HandlesWindowDecorations)
NO, setWindowHintsForStyle() gave every window the borderless window's
Motif hints: no decorations, which is right, but also functions 0, which
tells the window manager that the window may not be moved, resized,
minimized, maximized or closed. Mutter follows that for all but resize:
the _NET_WM_ALLOWED_ACTIONS it sets on the window lists resize, but not
move, minimize, maximize or close, so it won't do those for the window,
whether asked through _NET_WM_MOVERESIZE, _NET_WM_STATE, Super-drag or
its window menu. GNUstep's own title bar moves the window itself
(-setFrameOrigin:, which -placewindow:: carries out with
XMoveResizeWindow), and the hints don't restrict that, so this went
unnoticed.
A styled window the gui decorates now asks for no decorations but keeps
the functions its style allows, plus move. Borderless windows keep
functions 0.
This changes behaviour for everyone who uses GNUstep-drawn decorations
today: every styled window, sheets and utility panels included, now lets
the window manager move it (and resize, minimize, maximize or close it as
its style allows), where before it allowed nothing.
Testing: Tests/x11/motifhints.m creates windows of four styles with the
gui drawing the decorations and reads back their _MOTIF_WM_HINTS: the
flags, the functions and the decorations, compared exactly. Exact
comparison catches both halves of the bug (functions missing, or
decorations asked for), and the borderless case guards against the fix
spreading to windows that must stay fixed. It reads only the property
the backend sets, so it needs a display but no particular window manager.
Without this change the three styled checks fail ("3 0 0", nothing
allowed); with it all five checks pass.
Under GNOME Shell 48.7 (X11), with the GNUstep theme and the gui drawing
the decorations, Mutter's _NET_WM_ALLOWED_ACTIONS for a fully styled
window lists resize, fullscreen, change desktop, above and below without
this change, and includes move, maximize and close with it.
AI assistance: this change, its test and this description were written
with Claude (Anthropic's Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
danjboyd
added a commit
to danjboyd/plugins-themes-Adwaita
that referenced
this pull request
Oct 6, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
With
GSBackHandlesWindowDecorations(orGSX11HandlesWindowDecorations) NO,setWindowHintsForStyle()gives every window the borderless window's Motif hints: no decorations, which is right, but also functions 0, which tells the window manager that the window may not be moved, resized, minimized, maximized or closed. Mutter follows that for all but resize, so it won't move, minimize, maximize or close such a window, whether asked through_NET_WM_MOVERESIZE,_NET_WM_STATE, Super-drag or its window menu. GNUstep's own title bar moves the window itself (-setFrameOrigin:, which-placewindow::carries out withXMoveResizeWindow), and the hints don't restrict that, so this went unnoticed.A styled window the gui decorates now asks for no decorations but keeps the functions its style allows, plus move. Borderless windows keep functions 0, and nothing changes when the window manager draws the decorations.
This changes behaviour for everyone who uses GNUstep-drawn decorations: every styled window, sheets and utility panels included, now lets the window manager move it (and resize, minimize, maximize or close it as its style allows), where before it allowed nothing.
It may bear on #82. Since #228 the gui draws the decorations when the window manager draws none, and that is the case where these hints asked for no functions at all. I haven't been able to check whether the window manager in #82 honours the functions field, so I don't know whether this fixes it.
_MOTIF_WM_HINTS(flags, functions, decorations) with the gui drawing the decorations, before and after:Under GNOME Shell 48.7 (X11), with the GNUstep theme and the gui drawing the decorations, Mutter's
_NET_WM_ALLOWED_ACTIONSfor a fully styled window lists resize, fullscreen, change desktop, above and below before the change, and includes move, maximize and close after it.Tests/x11/motifhints.mis new: it creates windows of those four styles and compares their hints exactly, so it catches both a missing function and a frame being asked for, and the borderless case guards against the change reaching windows that must stay fixed. It reads only what the backend sets, so it needs a display but no particular window manager. Without the change three of its five checks fail; with it all five pass.Tests/x11gives 54 passed, 0 failed, against 49 passed, 0 failed on master. The changed file and the test also pass a syntax check with GCC's Objective-C front end.AI assistance: this change, its test and this description were written with Claude (Anthropic's Claude Code).
🤖 Generated with Claude Code