-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve tiling edge window previews: add "hover to activate" options #848
Conversation
Feels nice to use, but it doesn't seem to react while dragging a window, which is arguably an important use case |
Also maybe require pushback or some other continued movement for consecutive scrolling so as to not cause unwanted movement just leaving the pointer at rest on screen edge |
Oh lol, I specifically added that behaviour because it felt nice to leave the mouse there and continue to activate with a timeout... I can put an option to enable/disable that behaviour I guess. |
This one will likely need to wait. DnD's need a target to detect / activate clutter actors (basically same issue as #574) - which means we'll need to use a PointerWatcher to detect the pointer being on the edge (when it's dragging a window) to activate an edge window. Doable, but means we need to rewrite I think that's the issue anyway. I'll get this PR in and have a look at the a |
@Thesola10, if you're interested, I created a quick implementation of pointerWatching edge positions. It's responding to dragged windows (if you turn on activate on hover)... still not switching though so the dragging must be blocking the https://github.com/paperwm/PaperWM/tree/experimental-drag-drop-edge-window-previews This breaks button press on preview (disabled) - so if just experimental / concept testing atm. |
Anyways, some rethinking on concepts and implementations there - will have to tackle / look at that one at some point. Won't be in this PR though. |
Added an option to enable/disable this behaviour (if disabled, it won't activate consecutive activation - e.g. will have to move pointer away and back again... or click if you have click to activate enabled). |
P.S. try that one out (with |
Yeah I think I'd prefer a Pressure barrier, nonconsecutive just feels worse Also experimental branch doesn't seem to track moving windows at all? idk |
Well, it's "working" in the sense that it overcomes the main issue with dragging windows and previews (detection of when the dragged window is at the edge). Normally, you'll get no reaction or preview showing. In experimental branch, you'll get this: Screencast.from.2024-05-06.21-39-31.webmThe flashing preview on the edge (when dragging) is just showing that it's detected and it's trying to activate the next window (but as I mentioned there's some other issues blocking that). Still, it's just showing that using a PointerWatcher we can then detect when it's at an edge (whether dragging or not). I.e. we'll have to rewrite |
086e2f2
to
8e63900
Compare
8e63900
to
f9a8078
Compare
063ee6b
to
64c6f94
Compare
Okay, all, have experimented with pressures barriers and mouse "pushback" to non-consecutive hover activation. Pressure barriers don't work that well unless we move the mouse back a bit so the barrier resets. In any case, I've now implemented mouse "pushback" for non-consecutive hover activations. That is, after activation, we "push" the mouse back several pixels. This means you can avoid accidental activations (by leaving the mouse on the edge), and if you want to show next preview, you can nudge the mouse against the edge again. Consecutive (continual) is still an option in the settings. |
I do like the feel of this one (non-continual), even with a hover time of 0ms (instant activation). |
Oh yeah, feels really nice with 0ms, lgtm |
Co-authored-by: Karim Vergnes <me@thesola.io>
…mprove-edge-previews2
think we could make the pushback a bit earlier so pressure action feels actually consecutive and doesn't wait for the end of the previous animation? |
Not sure I properly understand what you're suggesting (and how it would work), but feel free to play around with modifying this behaviour and seeing how it feels. You'd probably want to change this: (which actions an edge-check and shows preview after animation time): Lines 224 to 235 in 4deb4f7
|
Fixes #779.
This PR implements the following improvements to tiling edge window previews: