fix: don't tile/move the desktop-icons window on Super+Arrow - #594
Open
4mGLn wants to merge 1 commit into
Open
Conversation
When no application window is focused (e.g. after clicking empty desktop space), display.get_focus_window() can return the desktop-icons window (Nautilus desktop / Desktop Icons NG), which is a Meta.Window of type DESKTOP rather than NORMAL. _onKeyboardMoveWin lacked the windowType guard that _onKeyboardUntileWindow already had, so pressing Super+Arrow would tile/resize the desktop window itself, making desktop icons appear to shift or float. Fixes domferr#183
4mGLn
force-pushed
the
fix/super-arrow-desktop-icons-move
branch
from
July 31, 2026 06:56
af044cf to
e3f828d
Compare
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.
Summary
Fixes #183 — desktop icons appear to "float"/shift when pressing Super+Left/Right/Up/Down while no application window is focused (e.g. right after clicking empty desktop space).
Why this happens
_onKeyboardMoveWininextension.tsis the handler for both themove-windowandspan-windowsignals — i.e. it's what runs on every Super+Arrow press. Its guard bails out when there's no focused window, when the focused window has lost focus, when itswm_classisgjs, or when it's fullscreen:But
display.get_focus_window()doesn't only return normal application windows. When you click on empty desktop space, GNOME can hand keyboard focus to the desktop-icons window (Nautilus desktop / Desktop Icons NG). That's a realMeta.Window, just one withwindowType === Meta.WindowType.DESKTOPinstead ofNORMAL. None of the existing guard conditions filter it out, so_onKeyboardMoveWinproceeds to tile/resize that window throughmonitorTilingManager.onKeyboardMoveWindow(...). Resizing the desktop-icons window's frame is exactly what makes the icons appear to shift/float — Tiling Shell ends up unintentionally treating the desktop background as a tileable window.Notably,
_onKeyboardUntileWindowalready guards against this same case with afocus_window.windowType !== Meta.WindowType.NORMALcheck — it was just missing from_onKeyboardMoveWin.Fix
Add the same
windowType !== Meta.WindowType.NORMALguard (already used elsewhere in this file) to_onKeyboardMoveWin, so Super+Arrow is a no-op whenever the "focused window" isn't a real application window.Test plan
npm run buildsucceeds