Closed Sierra410 closed 1 year ago
Any related logs when it comes?
Unfortunately, I don't have a graphics tablet and I can't reproduce it on my laptop.
I've cleaned up the code a bit, which may help to troubleshoot the problem further. You could add log(x, y, color.toText())
after this line, then run journalctl -fo cat /usr/bin/gnome-shell
in a terminal to tacking changes when moving the cursor.
I did a little bit of poking around.
It appears that the position is being captured using global.get_pointer()
, which most often (supposedly always?) returns the position of the mouse pointer, not any other pointer.
I found a mention of such issue on Reddit with no comments. Also (as far as I understood it) that the function was causing funny behavior in a different extension, and, judging by this, was replaced with... something? If I understand it right.
Interestingly, the issue is not replicate-able in a nested shell (dbus-run-session -- gnome-shell --nested --wayland
). There things work perfectly fine. Which is fun. :slightly_smiling_face:
Thanks!
It appears that the position is being captured using global.get_pointer(), which most often (supposedly always?) returns the position of the mouse pointer, not any other pointer.
Interestingly, the issue is not replicate-able in a nested shell (dbus-run-session -- gnome-shell --nested --wayland). There things work perfectly fine. Which is fun. slightly_smiling_face
I don't know exactly what the problem is, but it looks related to https://gitlab.gnome.org/GNOME/mutter/-/issues/2411 :|
I found a mention of such issue on Reddit with no comments. Also (as far as I understood it) that the function was causing funny behavior in a different extension, and, judging by https://github.com/Leleat/Tiling-Assistant/issues/42#issuecomment-805082940, was replaced with... something? If I understand it right.
I think they may be saying the same thing about using the event coordinate instead of the global pointer. Accordingly, I made a patch working with the mouse, maybe you can test if it works for this issue.
It works! Amazing!
Minor issue:
The popup spawns at the position of the mouse pointer, so it flickers there for a single frame, if the tablet is being used. Doesn't affect the functionality in any meaningful way, however.
Screencast from 2023-07-22 13-53-14.webm
It works! Amazing!
Minor issue: The popup spawns at the position of the mouse pointer, so it flickers there for a single frame, if the tablet is being used. Doesn't affect the functionality in any meaningful way, however. Screencast from 2023-07-22 13-53-14.webm
Could you test if the updated patch fixes the issue?
I update the patch to remove all
global.get_pointer()
s and hope it works.
The picker seems to get attached to the pointer that belongs to the mouse, most of the time.
It can work with the tablet, and it, sometimes, does. However, it's an incredibly rare event that I can't reproduce reliably.
Screencast from 2023-07-01 09-27-39.webm