diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2019-07-12 14:33:17 -0300 |
---|---|---|
committer | Jonas Ã…dahl <jadahl@gmail.com> | 2019-08-23 13:23:07 +0000 |
commit | fb9e8768a386fa7078e52374a1d81e8849ad9347 (patch) | |
tree | a8b243f14e6703caa2d8796d10a9049cfd47ddf6 /src/wayland/meta-wayland-subsurface.c | |
parent | c747be84d97085f31782879b98d911cac4bd9c40 (diff) | |
download | mutter-fb9e8768a386fa7078e52374a1d81e8849ad9347.tar.gz |
window-actor: Handle geometry scale
Geometry scale is applied to each surface individually, using
Clutter scales, and not only this breaks subsurfaces, it also
pollutes the toolkit and makes the actor tree slightly too
fragile. If GNOME Shell mistakenly tries to set the actor scale
of any of these surfaces, for example, various artifacts might
happen.
Move geometry scale handling to MetaWindowActor. It is applied
as a child transform operation, so that the Clutter-managed
scale properties are left untouched.
In the future where the entirety of the window is managed by a
ClutterContent itself, the geometry scale will be applied
directly into the transform matrix of MetaWindowActor. However,
doing that now would break the various ClutterClones used by
GNOME Shell, so the child transform is an acceptable compromise
during this transition.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/409
Diffstat (limited to 'src/wayland/meta-wayland-subsurface.c')
-rw-r--r-- | src/wayland/meta-wayland-subsurface.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c index bde7bef6e..3b813a191 100644 --- a/src/wayland/meta-wayland-subsurface.c +++ b/src/wayland/meta-wayland-subsurface.c @@ -56,7 +56,6 @@ sync_actor_subsurface_state (MetaWaylandSurface *surface) { ClutterActor *actor = CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface)); MetaWindow *toplevel_window; - int geometry_scale; int x, y; toplevel_window = meta_wayland_surface_get_toplevel_window (surface); @@ -66,9 +65,8 @@ sync_actor_subsurface_state (MetaWaylandSurface *surface) if (toplevel_window->client_type == META_WINDOW_CLIENT_TYPE_X11) return; - geometry_scale = meta_window_wayland_get_geometry_scale (toplevel_window); - x = (surface->offset_x + surface->sub.x) * geometry_scale; - y = (surface->offset_y + surface->sub.y) * geometry_scale; + x = surface->offset_x + surface->sub.x; + y = surface->offset_y + surface->sub.y; clutter_actor_set_position (actor, x, y); |