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 778474 - Set right scale for tablet tool cursors on hidpi
Set right scale for tablet tool cursors on hidpi
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-02-10 23:56 UTC by Carlos Garnacho
Modified: 2017-02-15 22:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Keep pointer to cursor sprite on MetaWaylandTabletTool (2.01 KB, patch)
2017-02-10 23:57 UTC, Carlos Garnacho
committed Details | Review
wayland: Update tool cursor scale when crossing monitors (2.56 KB, patch)
2017-02-10 23:57 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2017-02-10 23:56:39 UTC
Tool cursors don't update properly when on a hidpi screen. Patches coming.
Comment 1 Carlos Garnacho 2017-02-10 23:57:31 UTC
Created attachment 345501 [details] [review]
wayland: Keep pointer to cursor sprite on MetaWaylandTabletTool
Comment 2 Carlos Garnacho 2017-02-10 23:57:37 UTC
Created attachment 345502 [details] [review]
wayland: Update tool cursor scale when crossing monitors

This makes tool cursors properly scaled on hidpi.
Comment 3 Rui Matos 2017-02-14 15:47:19 UTC
Review of attachment 345501 [details] [review]:

ok
Comment 4 Rui Matos 2017-02-14 16:03:41 UTC
Review of attachment 345501 [details] [review]:

::: src/wayland/meta-wayland-tablet-tool.c
@@ +398,3 @@
   tool->cursor_surface_destroy_listener.notify = tablet_tool_handle_cursor_surface_destroy;
 
+  tool->default_sprite = meta_cursor_sprite_from_theme (META_CURSOR_CROSSHAIR);

btw, I just noticed that the sprite was being leaked before this change
Comment 5 Rui Matos 2017-02-14 16:05:07 UTC
Review of attachment 345502 [details] [review]:

with the signal disconnection bit fixed, this looks fine

::: src/wayland/meta-wayland-tablet-tool.c
@@ +441,3 @@
     }
 
+  g_signal_handlers_disconnect_by_data (tool->default_sprite, tool);

could easily keep the signal handler id to disconnect here
Comment 6 Carlos Garnacho 2017-02-15 22:30:34 UTC
(In reply to Rui Matos from comment #4)
> Review of attachment 345501 [details] [review] [review]:
> 
> ::: src/wayland/meta-wayland-tablet-tool.c
> @@ +398,3 @@
>    tool->cursor_surface_destroy_listener.notify =
> tablet_tool_handle_cursor_surface_destroy;
>  
> +  tool->default_sprite = meta_cursor_sprite_from_theme
> (META_CURSOR_CROSSHAIR);
> 
> btw, I just noticed that the sprite was being leaked before this change

Yeah... at least this one should be backported to gnome-3-22
Comment 7 Carlos Garnacho 2017-02-15 22:34:47 UTC
Attachment 345501 [details] pushed as a25915f - wayland: Keep pointer to cursor sprite on MetaWaylandTabletTool
Attachment 345502 [details] pushed as 6b384dc - wayland: Update tool cursor scale when crossing monitors