fix: restore Super key activation for tiling mode (regression from 64afeba)#506
Merged
domferr merged 1 commit intodomferr:v18.0from Mar 1, 2026
Merged
Conversation
Owner
|
Hi, thanks a million! |
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.
Problem
Fixes #485 — After updating from v17.2 to v17.3, pressing the Super key while dragging a window no longer triggers tiling mode.
Root Cause
Commit 64afeba (
refactor: use Clutter.ModifierType as mask) introduced two issues:Wrong mask for Super key:
Clutter.ModifierType.SUPER_MASK(bit 26, value0x4000000) was used, butglobal.get_pointer()returnsMOD4_MASK(bit 6, value64) for the Super key. These are different bit positions in the modifier bitmask —SUPER_MASKis a GDK4-style semantic mask, whileMOD4_MASKis what Clutter/Mutter actually reports at runtime.Overly strict comparison: The check was changed from
(modifier & mask) !== 0to(modifier & mask) === mask. The strict equality fails when additional modifier bits are set alongside the target key (which commonly happens with Super).The old magic numbers (
val = 2, 3, 6as bit positions) happened to be correct:1 << 6 = 64 = MOD4_MASK, which matches whatglobal.get_pointer()returns for Super.Fix
Clutter.ModifierType.MOD4_MASKinstead ofSUPER_MASKfor the Super key!== 0comparison for robustness (matches behavior of other modifier checks in the codebase, e.g.,hoverLine.tsandlayoutEditor.ts)This preserves the intent of 64afeba (using named enum constants instead of magic numbers) while fixing the regression.