mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
wayland-tablet-tool: Downscale the sprite texture in FB mode
When using scaled framebuffer we need to downscale the texture size in order to get the cursor properly drawn at its real size and in good quality. https://bugzilla.gnome.org/show_bug.cgi?id=765011 https://gitlab.gnome.org/GNOME/mutter/merge_requests/3
This commit is contained in:
parent
412d5685ba
commit
ceb4fe2151
@ -398,8 +398,20 @@ tool_cursor_prepare_at (MetaCursorSpriteXcursor *sprite_xcursor,
|
|||||||
|
|
||||||
/* Reload the cursor texture if the scale has changed. */
|
/* Reload the cursor texture if the scale has changed. */
|
||||||
if (logical_monitor)
|
if (logical_monitor)
|
||||||
meta_cursor_sprite_xcursor_set_theme_scale (sprite_xcursor,
|
{
|
||||||
logical_monitor->scale);
|
MetaCursorSprite *cursor_sprite = META_CURSOR_SPRITE (sprite_xcursor);
|
||||||
|
float ceiled_scale;
|
||||||
|
|
||||||
|
ceiled_scale = ceilf (logical_monitor->scale);
|
||||||
|
meta_cursor_sprite_xcursor_set_theme_scale (sprite_xcursor,
|
||||||
|
(int) ceiled_scale);
|
||||||
|
|
||||||
|
if (meta_is_stage_views_scaled ())
|
||||||
|
meta_cursor_sprite_set_texture_scale (cursor_sprite,
|
||||||
|
1.0 / ceiled_scale);
|
||||||
|
else
|
||||||
|
meta_cursor_sprite_set_texture_scale (cursor_sprite, 1.0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaWaylandTabletTool *
|
MetaWaylandTabletTool *
|
||||||
|
Loading…
Reference in New Issue
Block a user