display: Ceil pointer cursor theme scale when fractional
The fraction of the scale was accidentally casted away, lets ceil it instead. https://bugzilla.gnome.org/show_bug.cgi?id=765011
This commit is contained in:
parent
e4a2d15171
commit
c388a8fc9d
1 changed files with 11 additions and 6 deletions
|
@ -1436,7 +1436,7 @@ meta_cursor_for_grab_op (MetaGrabOp op)
|
|||
return META_CURSOR_DEFAULT;
|
||||
}
|
||||
|
||||
static int
|
||||
static float
|
||||
find_highest_logical_monitor_scale (MetaBackend *backend,
|
||||
MetaCursorSprite *cursor_sprite)
|
||||
{
|
||||
|
@ -1447,7 +1447,7 @@ find_highest_logical_monitor_scale (MetaBackend *backend,
|
|||
ClutterRect cursor_rect;
|
||||
GList *logical_monitors;
|
||||
GList *l;
|
||||
int highest_scale = 0;
|
||||
float highest_scale = 0.0;
|
||||
|
||||
cursor_rect = meta_cursor_renderer_calculate_rect (cursor_renderer,
|
||||
cursor_sprite);
|
||||
|
@ -1482,13 +1482,18 @@ root_cursor_prepare_at (MetaCursorSpriteXcursor *sprite_xcursor,
|
|||
|
||||
if (meta_is_stage_views_scaled ())
|
||||
{
|
||||
int scale;
|
||||
float scale;
|
||||
|
||||
scale = find_highest_logical_monitor_scale (backend, cursor_sprite);
|
||||
if (scale != 0)
|
||||
if (scale != 0.0)
|
||||
{
|
||||
meta_cursor_sprite_xcursor_set_theme_scale (sprite_xcursor, scale);
|
||||
meta_cursor_sprite_set_texture_scale (cursor_sprite, 1.0 / scale);
|
||||
float ceiled_scale;
|
||||
|
||||
ceiled_scale = ceilf (scale);
|
||||
meta_cursor_sprite_xcursor_set_theme_scale (sprite_xcursor,
|
||||
(int) ceiled_scale);
|
||||
meta_cursor_sprite_set_texture_scale (cursor_sprite,
|
||||
1.0 / ceiled_scale);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue