[mutter/wip/carlosg/no-scaled-views-check-in-thread: 11/11] backends/native: Check whether views are scaled via MetaViewportInfo
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/no-scaled-views-check-in-thread: 11/11] backends/native: Check whether views are scaled via MetaViewportInfo
- Date: Fri, 26 Mar 2021 11:29:49 +0000 (UTC)
commit d3f850c6ac613fbe8698a11f60758e5aa3b52e90
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Mar 26 11:27:07 2021 +0100
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.
src/backends/native/meta-seat-impl.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/backends/native/meta-seat-impl.c b/src/backends/native/meta-seat-impl.c
index a2ba884b9c..9137dc3c9c 100644
--- a/src/backends/native/meta-seat-impl.c
+++ b/src/backends/native/meta-seat-impl.c
@@ -1179,14 +1179,15 @@ meta_seat_impl_filter_relative_motion (MetaSeatImpl *seat_impl,
float *dx,
float *dy)
{
- int view = -1, dest_view;
+ int view, dest_view;
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;
- 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)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]