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 752616 - wayland: Always apply scaling factor to cursor hotspot and dimension
wayland: Always apply scaling factor to cursor hotspot and dimension
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-07-20 08:53 UTC by Jonas Ådahl
Modified: 2015-07-20 10:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Always apply scaling factor to cursor hotspot and dimension (2.26 KB, patch)
2015-07-20 08:53 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2015-07-20 08:53:13 UTC
Prior to this patch, the hotspot would be passed in buffer coordinate
space. Where this were ever tested, i.e. in a patched mutter, the
server interpreted them incorrectly, which meant it went undiscovered.
In the updated mutter patches the incorrect behavior in GTK+ was
discovered due to the behavior in mutter was corrected.

In the themed cursor case, the dimensions were not correctly scaled
either, but this had no negative visible effect because the dimension is
only used for reporting damage tracking, and passing a bigger damage
region than surface has no negative visible effects.
Comment 1 Jonas Ådahl 2015-07-20 08:53:18 UTC
Created attachment 307735 [details] [review]
wayland: Always apply scaling factor to cursor hotspot and dimension
Comment 2 Carlos Garnacho 2015-07-20 09:28:57 UTC
Review of attachment 307735 [details] [review]:

LGTM. /me wonders if it's really needed to store scale separately for surface/non-surface cases after reading code around.
Comment 3 Jonas Ådahl 2015-07-20 09:51:35 UTC
Attachment 307735 [details] pushed as 2943bfe - wayland: Always apply scaling factor to cursor hotspot and dimension
Comment 4 Jonas Ådahl 2015-07-20 09:54:26 UTC
(In reply to Carlos Garnacho from comment #2)
> Review of attachment 307735 [details] [review] [review]:
> 
> LGTM. /me wonders if it's really needed to store scale separately for
> surface/non-surface cases after reading code around.

Reason is mostly to have a logical separation between the "surface based" cursor state, and a "wl_cursor" based cursor state. Only one is valid at any time, so a "scale" parameter could be shared, but it'd mix the what parts is valid at what time separation.
Comment 5 Carlos Garnacho 2015-07-20 10:13:16 UTC
(In reply to Jonas Ådahl from comment #4)
> (In reply to Carlos Garnacho from comment #2)
> > Review of attachment 307735 [details] [review] [review] [review]:
> > 
> > LGTM. /me wonders if it's really needed to store scale separately for
> > surface/non-surface cases after reading code around.
> 
> Reason is mostly to have a logical separation between the "surface based"
> cursor state, and a "wl_cursor" based cursor state. Only one is valid at any
> time, so a "scale" parameter could be shared, but it'd mix the what parts is
> valid at what time separation.

That was partly my point, cursors are meant to be static after creation, the cursor-type property is construct only, so you're not going to get changes between wl_cursor and surface backing.