Skip to content

Implement reversible span selection behavior#526

Open
hitex wants to merge 1 commit into
domferr:mainfrom
hitex:reversible-span-selection
Open

Implement reversible span selection behavior#526
hitex wants to merge 1 commit into
domferr:mainfrom
hitex:reversible-span-selection

Conversation

@hitex
Copy link
Copy Markdown

@hitex hitex commented Mar 30, 2026

Hello, @domferr

First of all, thank you for amazing extension!

My PR implements a feature that I am missing from FancyZones - reversible span selections. Currently when spanning the window, if you move too much with the mouse - you need to cancel spanning and start over, which is really annoying. In this PR you can change the spanning area freely.

Heres how the logic is implemented:

  • when spanning starts, the starting tile is stored as an anchor
  • as the pointer moves, selected rectangle is recomputed from anchor + current tile
  • tile previews are rebuilt from original tile geometry each time the new tile is hovered
  • anchor/hover state is cleared when span mode ends

Here is the video recording of the behavior:

reversible-span.mp4

It works on Gnome 49. Did not test older versions yet because I want to get your feedback first and see if you are willing to incorporate this change. Let me know what you think.

PS. I really missed the tests, did you consider adding them at some point?

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