Repository navigation
Fix GNOME 51 crash: stop calling set_unmaximize_flags() - #594
Open
Faloneagent wants to merge 1 commit into
Open
Faloneagent wants to merge 1 commit into
Faloneagent wants to merge 1 commit into
Conversation
On GNOME 51 (Mutter 51), metaWindow.set_unmaximize_flags() crashes gnome-shell with SIGSEGV when Forge moves or tiles a window. Since the call sits inside try/catch, the JS fallback never runs. Add unmaximizeWindow(), which feature-detects the old API (get_maximized present, GNOME <=48, behavior unchanged) and otherwise only calls unmaximize() on windows that are maximized. Fixes forge-ext#592 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
zzantares
pushed a commit
to zzantares/dotless
that referenced
this pull request
Nov 12, 2026
Forge calls set_unmaximize_flags(BOTH) unconditionally, both in move() and from the 200 ms timer it queues on window-create. mutter 50.4 made that a no-op unless the window really was maximized; mutter 51 rewrote the call to always run the window-config pipeline, which reaches meta_window_wayland_update_main_monitor. There meta_wayland_surface_get_toplevel_window() returns NULL for a window that is already being destroyed, and the result goes to meta_window_update_monitor unchecked, which reads window->display at offset 0x18. A window that closes inside those 200 ms (a Firefox Google-login popup, or Chrome per upstream) therefore takes the whole session down: five identical SIGSEGVs here on 2026-11-12, all `segfault at 18`. Take the upstream fix (forge-ext/forge#594, for #592) as a fetchpatch pinned to its commit rather than as a flake input: nixpkgs pins forge at 50.1-development, the PR branches off a newer main, and swapping the source tree would also swap the version our dconf keys and stylesheet are written for. A pinned patch is immutable, carries its provenance in the url, and fails loudly once nixpkgs ships a forge that no longer needs it. The PR is unmerged and forge is unmaintained, so this stays until that changes. Verified: the built extension keeps no set_unmaximize_flags call sites and routes both through the new unmaximizeWindow(), which only unmaximizes an actually maximized window; is_maximized() is API forge already uses at this version. kosmos resolves gnomeExtensions.forge to that patched path, and `just check-linux` builds. Co-Authored-By: Claude Opus 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.
Fixes #592.
On GNOME 51 (Mutter 51),
metaWindow.set_unmaximize_flags()crashes gnome-shell with SIGSEGV when Forge moves or tiles a window. The stack trace points atmove()inwindow.js. Because the call sits insidetry/catch, the JS fallback never runs.This adds
unmaximizeWindow(), which feature-detects the old API (get_maximizedpresent → GNOME ≤48, behavior unchanged) and otherwise only callsunmaximize()on windows that are maximized.Tested on Ubuntu 26.10, GNOME Shell 51.0, Wayland: with this change, opening Firefox with Forge enabled no longer crashes the shell. Not tested on GNOME 45–50, and I did not reproduce the "on window close" case from #592.
🤖 Generated with Claude Code