1
0
Fork 0

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>
This commit is contained in:
Christian Rauch 2021-03-22 00:29:34 +00:00 committed by Christian Rauch
parent cfe6cda694
commit aacdc0b6f1
3 changed files with 0 additions and 15 deletions

View file

@ -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;

View file

@ -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))
{

View file

@ -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;