Conversation
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
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
move/workspace_switch_after(drag to the output edge to switch workspace) was only functional whenenable_snapwas on, and silently did nothing when thegridplugin 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):MOVE_OP_CLEAR_PREVIEW(0), and!operationwas then used as the "disable workspace-switch timer" condition — always true.SLOT_NONE, so theupdate_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.