Conversation
|
Currently does not work as coordinates do not seem to update. The way I understand it, the Stage is somehow not the global vantage point I thought it would be events-wise. What I need is an Actor that can intercept every single touch-event in the entirety of GNOME Shell... |
| // move to current cursor position | ||
| let [x, y, _mods] = global.get_pointer(); | ||
| let [x, y, _mods] = Utils.getPointerCoords(); |
There was a problem hiding this comment.
Likely unwarranted -- if we want touch coords to remain separate from a UX standpoint, this just won't cut it. Then again, I'm not even sure how that may relate to drag-and-drop softlock, so I'll wait until I get my code to work before I undo this change.
|
Another proposal, which fixes the immediate issue of centering touch window movement, is to discard changes to diff --git a/grab.js b/grab.js
index 5aee3ec..9956e81 100644
--- a/grab.js
+++ b/grab.js
@@ -63,7 +63,7 @@ export class MoveGrab {
this.initialY = clone.targetY;
Easer.removeEase(clone);
- let [gx, gy, $] = global.get_pointer();
+ let [gx, gy, $] = Utils.getPointerCoords();
let px = (gx - actor.x) / actor.width;
let py = (gy - actor.y) / actor.height;However this is much less elegant and may cause confusion as to the role of |
|
Might have to use |
This approach calls Utils.getPointerCoords() (the unified touch broker) when the event starts ONLY. Since the touch tracker fails to update once the event is "adopted" by a widget, we still need to update the global cursor's coordinates. This superficially fixes #764, but REVERT this commit before working on cleaning up touch handling!
|
Pushed #791 as an alternate version of this fix, implementing this solution. |
This approach calls Utils.getPointerCoords() (the unified touch broker) when the event starts ONLY. Since the touch tracker fails to update once the event is "adopted" by a widget, we still need to update the global cursor's coordinates. This superficially fixes #764, but REVERT this commit before working on cleaning up touch handling!
|
I wonder if it's because |
|
huh. this is annoying |
I noticed that - do you need me to revert anything? |
|
nah, the branch is still there in the correct state so you can delete it if you want, as long as the comment and commit message are there it's fine |

This closes #764 by implementing a broker function,
Utils.getPointerCoords(), which selects fromglobal.get_cursor()and a memorized set of coordinates from the last touch event on Stage.Hopefully this approach will also correct future touchscreen misbehavior.
Edit 2024-03-09:
This PR has been
repurposed as a continuation foraccidentally superseded by the broker partly introduced in #791.