From 718a89eb2f48a407c4681c403c291ef19b927fac Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Sat, 25 Oct 2014 12:50:19 +0200 Subject: [PATCH] meta-wayland-surface: Correcly scale the input region The input region currently only gets scaled by the surface scale while ignoring the output scale, which causes input events to not get delivered correctly for clients on hidpi screens. So take the output scale into account when doing so. https://bugzilla.gnome.org/show_bug.cgi?id=739161 --- src/wayland/meta-wayland-surface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index cda727c47..68fdb82f3 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -408,7 +408,8 @@ commit_pending_state (MetaWaylandSurface *surface, } if (pending->input_region) { - pending->input_region = scale_region (pending->input_region, surface->scale); + pending->input_region = scale_region (pending->input_region, + meta_surface_actor_wayland_get_scale (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor))); meta_surface_actor_set_input_region (surface->surface_actor, pending->input_region); }