x11-display: Use X11 UI scaling factor for cursor theme size
As with Xsettings, we want to use the X11 UI scaling factor to set the cursor size, so that clients use a larger theme, both when using `native-xwayland-scaling` and a physical layout mode. Fixes: 6e8c7c5f84 ("Add experimental mode to use native scaling of Xwayland clients") Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3992>
This commit is contained in:
parent
babafe01fc
commit
cddd3a7df0
@ -103,8 +103,19 @@ cursor_sprite_prepare_at (MetaCursorSprite *cursor_sprite,
|
||||
meta_monitor_manager_get_logical_monitor_at (monitor_manager, x, y);
|
||||
if (logical_monitor)
|
||||
{
|
||||
int surface_scale = surface->applied_state.scale;
|
||||
int surface_scale;
|
||||
float texture_scale;
|
||||
#ifdef HAVE_XWAYLAND
|
||||
MetaWaylandCompositor *wayland_compositor =
|
||||
meta_context_get_wayland_compositor (context);
|
||||
MetaXWaylandManager *xwayland_manager =
|
||||
&wayland_compositor->xwayland_manager;
|
||||
|
||||
if (meta_wayland_surface_is_xwayland (surface))
|
||||
surface_scale = meta_xwayland_get_x11_ui_scaling_factor (xwayland_manager);
|
||||
else
|
||||
#endif /* HAVE_XWAYLAND */
|
||||
surface_scale = surface->applied_state.scale;
|
||||
|
||||
if (meta_backend_is_stage_views_scaled (backend))
|
||||
texture_scale = 1.0f / surface_scale;
|
||||
|
@ -1965,7 +1965,7 @@ update_cursor_theme (MetaX11Display *x11_display)
|
||||
MetaXWaylandManager *xwayland_manager =
|
||||
&wayland_compositor->xwayland_manager;
|
||||
|
||||
scale = meta_xwayland_get_effective_scale (xwayland_manager);
|
||||
scale = meta_xwayland_get_x11_ui_scaling_factor (xwayland_manager);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user