Skip to content

move: allow workspace switching without snap enabled - #3155

Open
bornmw wants to merge 1 commit into
WayfireWM:masterfrom
bornmw:move-workspace-switch-decouple-snap
Open

bornmw wants to merge 1 commit into
WayfireWM:masterfrom
bornmw:move-workspace-switch-decouple-snap

Conversation

@bornmw

@bornmw bornmw commented Oct 5, 2026

Copy link
Copy Markdown

Summary

move/workspace_switch_after (drag to the output edge to switch workspace) was only functional when enable_snap was on, and silently did nothing when the grid plugin was not loaded. #3143 was reported and closed on the assumption that the feature exists; this makes it actually work in its documented configuration.

Root cause

In update_slot() (plugins/single_plugins/move.cpp):

  • When snap is disabled, the operation is forced to MOVE_OP_CLEAR_PREVIEW (0), and !operation was then used as the "disable workspace-switch timer" condition — always true.
  • When grid is not loaded, the non-grid code path early-returns when the slot is unchanged; with snap disabled the slot is always SLOT_NONE, so the update_workspace_switch_timeout() call at the end of the function was unreachable.

Fix

Track the pointer being outside the output geometry in its own variable and pass that to update_workspace_switch_timeout(), and move that call before the early return so it runs regardless of the grid plugin.

Testing

Tested on 0.11.0 and master: workspace switching on drag now works with snap disabled, with and without the grid plugin, and snap tiling is unchanged.

The workspace_switch_after feature was only functional when enable_snap
was on, because update_slot() forced the operation to
MOVE_OP_CLEAR_PREVIEW when snap was disabled and then used !operation
to disable the workspace-switch timer. Additionally, when grid was not
loaded, the early return for an unchanged slot skipped the timer
update entirely, so the feature depended on the grid plugin as well.

Track the pointer being outside the output geometry in its own
variable and update the workspace-switch timer for it, so the feature
works with snap disabled and without the grid plugin.

Refs: WayfireWM#3143
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.

1 participant