Skip to content

fix: don't tile/move the desktop-icons window on Super+Arrow - #594

Open
4mGLn wants to merge 1 commit into
domferr:v18.0from
4mGLn:fix/super-arrow-desktop-icons-move
Open

fix: don't tile/move the desktop-icons window on Super+Arrow#594
4mGLn wants to merge 1 commit into
domferr:v18.0from
4mGLn:fix/super-arrow-desktop-icons-move

Conversation

@4mGLn

@4mGLn 4mGLn commented Jul 31, 2026

Copy link
Copy Markdown

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

_onKeyboardMoveWin in extension.ts is the handler for both the move-window and span-window signals — 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 its wm_class is gjs, or when it's fullscreen:

if (
    !focus_window ||
    !focus_window.has_focus() ||
    (focus_window.get_wm_class() &&
        focus_window.get_wm_class() === 'gjs') ||
    focus_window.is_fullscreen()
)
    return;

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 real Meta.Window, just one with windowType === Meta.WindowType.DESKTOP instead of NORMAL. None of the existing guard conditions filter it out, so _onKeyboardMoveWin proceeds to tile/resize that window through monitorTilingManager.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, _onKeyboardUntileWindow already guards against this same case with a focus_window.windowType !== Meta.WindowType.NORMAL check — it was just missing from _onKeyboardMoveWin.

Fix

Add the same windowType !== Meta.WindowType.NORMAL guard (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 build succeeds
  • Built extension installed locally on GNOME Shell 46 (Ubuntu 24.04), Tiling Shell v17.3
  • Verified after full logout/login: click empty desktop space, hold Super+Arrow — desktop icons no longer move

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
4mGLn force-pushed the fix/super-arrow-desktop-icons-move branch from af044cf to e3f828d Compare July 31, 2026 06:56
@domferr
domferr changed the base branch from main to v18.0 August 9, 2026 10:48
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.

Desktop icons floating(moving)

2 participants