[mutter/gnome-40] wayland: Apply states without needing a newly attached buffer
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-40] wayland: Apply states without needing a newly attached buffer
- Date: Sat, 31 Jul 2021 17:20:42 +0000 (UTC)
commit 351718b5adab52149fd9d4e805f9688dd1a6863b
Author: Christian Rauch <Rauch Christian gmx de>
Date: Mon Mar 22 00:29:34 2021 +0000
wayland: Apply states without needing a newly attached buffer
Applying some states, such as the minimum and maximum toplevel size, do not
require a new buffer and can operate on the old buffer. Requiring a client
to commit a new buffer just to change such states prevents setting limits
on an already existing surface buffer.
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1716
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1795>
(cherry picked from commit aacdc0b6f12a150822e2866d2cc134bb3434bac0)
src/wayland/meta-wayland-legacy-xdg-shell.c | 6 ------
src/wayland/meta-wayland-wl-shell.c | 3 ---
src/wayland/meta-wayland-xdg-shell.c | 6 ------
3 files changed, 15 deletions(-)
---
diff --git a/src/wayland/meta-wayland-legacy-xdg-shell.c b/src/wayland/meta-wayland-legacy-xdg-shell.c
index 6dc8cc402f..3c1ed8e935 100644
--- a/src/wayland/meta-wayland-legacy-xdg-shell.c
+++ b/src/wayland/meta-wayland-legacy-xdg-shell.c
@@ -709,9 +709,6 @@ meta_wayland_zxdg_toplevel_v6_post_apply_state (MetaWaylandSurfaceRole *surface
if (!window)
return;
- if (!pending->newly_attached)
- return;
-
old_geometry = xdg_surface_priv->geometry;
surface_role_class =
@@ -1016,9 +1013,6 @@ meta_wayland_zxdg_popup_v6_post_apply_state (MetaWaylandSurfaceRole *surface_ro
META_WAYLAND_SURFACE_ROLE_CLASS (meta_wayland_zxdg_popup_v6_parent_class);
surface_role_class->post_apply_state (surface_role, pending);
- if (!pending->newly_attached)
- return;
-
if (!surface->buffer_ref->buffer)
return;
diff --git a/src/wayland/meta-wayland-wl-shell.c b/src/wayland/meta-wayland-wl-shell.c
index 2388afd287..964c185b23 100644
--- a/src/wayland/meta-wayland-wl-shell.c
+++ b/src/wayland/meta-wayland-wl-shell.c
@@ -611,9 +611,6 @@ wl_shell_surface_role_apply_state (MetaWaylandSurfaceRole *surface_role,
if (!window)
return;
- if (!pending->newly_attached)
- return;
-
input_region = meta_wayland_surface_calculate_input_region (surface);
if (!cairo_region_is_empty (input_region))
{
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c
index 5548e558c2..c5f0d0b913 100644
--- a/src/wayland/meta-wayland-xdg-shell.c
+++ b/src/wayland/meta-wayland-xdg-shell.c
@@ -810,9 +810,6 @@ meta_wayland_xdg_toplevel_post_apply_state (MetaWaylandSurfaceRole *surface_rol
META_WAYLAND_SURFACE_ROLE_CLASS (meta_wayland_xdg_toplevel_parent_class);
surface_role_class->post_apply_state (surface_role, pending);
- if (!pending->newly_attached)
- return;
-
window_geometry = meta_wayland_xdg_surface_get_window_geometry (xdg_surface);
geometry_changed = !meta_rectangle_equal (&old_geometry, &window_geometry);
@@ -1164,9 +1161,6 @@ meta_wayland_xdg_popup_post_apply_state (MetaWaylandSurfaceRole *surface_role,
if (!window)
return;
- if (!pending->newly_attached)
- return;
-
if (!surface->buffer_ref->buffer)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]