After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762662 - gdk_device_warp doesn't support sub-gdk-pixel warpping
gdk_device_warp doesn't support sub-gdk-pixel warpping
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Class: GdkDevice
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
Carlos Garnacho
Depends on:
Blocks:
 
 
Reported: 2016-02-25 04:59 UTC by Xidorn Quan
Modified: 2018-04-15 00:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Xidorn Quan 2016-02-25 04:59:53 UTC
gdk_device_warp accepts two gints for its target position, which means it is impossible to warp the pointer to a sub-gdk-pixel position on HiDPI mode, which could be problematic in some cases.
Comment 1 Matthias Clasen 2016-02-25 13:19:03 UTC
Unless you have a concrete case, I don't think it is worth keeping a bug open for a hypothetical "some cases". What we should do in any case is clarify what coordinate space those arguments are in.
Comment 2 Xidorn Quan 2016-02-25 13:59:44 UTC
When I tried to fix Firefox's bug 1244546 [1] that the Pointer Lock API doesn't work properly on our GTK+ port with HiDPI environment, I found some difficulity writing the patch due to this issue.

In Firefox, the Pointer Lock API works by constantly moving the pointer back to the center of the window. For not exposing the extra mouse move events triggered by the pointer warpping, we explicitly detect and filter out an event when it is right after another event, and it is at the center of the window.

Since the center of the window we calculate can be at a sub-gdk-pixel position, not being able to move to the exact center causes us fail to filter out the events, and consequently the warpping constantly triggers mouse move.

This can be worked around via rounding the position we use for warpping in advance. This is not required in any other platforms, though.

To clarify, we do not need to wait for this getting fixed, so it's not critical for us. But I think providing this could make future developers happier when working on HiDPI support with GTK+.


[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1244546
Comment 3 Matthias Clasen 2018-02-10 04:56:24 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 4 Xidorn Quan 2018-02-10 05:17:40 UTC
I'd like to keep this open, but I cannot change the status of this bug to anything other than RESOLVED...
Comment 5 Matthias Clasen 2018-04-15 00:01:23 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new