backends/native: Check whether views are scaled via MetaViewportInfo

The input thread is in deep water doing the meta_is_*() check itself,
as that pokes the MetaMonitorManager managed by the main thread. Use
the getter from the MetaViewportInfo instead.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1793>
This commit is contained in:
Carlos Garnacho 2021-03-26 11:27:07 +01:00 committed by Marge Bot
parent 24dbfbfcf2
commit f92232ae4f

View File

@ -1179,14 +1179,15 @@ meta_seat_impl_filter_relative_motion (MetaSeatImpl *seat_impl,
float *dx, float *dx,
float *dy) float *dy)
{ {
int view = -1, dest_view; int view, dest_view;
float new_dx, new_dy, scale; float new_dx, new_dy, scale;
if (meta_is_stage_views_scaled ()) if (!seat_impl->viewports)
return;
if (meta_viewport_info_is_views_scaled (seat_impl->viewports))
return; return;
if (seat_impl->viewports) view = meta_viewport_info_get_view_at (seat_impl->viewports, x, y);
view = meta_viewport_info_get_view_at (seat_impl->viewports, x, y);
if (view < 0) if (view < 0)
return; return;