mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
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:
parent
cfe6cda694
commit
aacdc0b6f1
@ -709,9 +709,6 @@ meta_wayland_zxdg_toplevel_v6_post_apply_state (MetaWaylandSurfaceRole *surface
|
|||||||
if (!window)
|
if (!window)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!pending->newly_attached)
|
|
||||||
return;
|
|
||||||
|
|
||||||
old_geometry = xdg_surface_priv->geometry;
|
old_geometry = xdg_surface_priv->geometry;
|
||||||
|
|
||||||
surface_role_class =
|
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);
|
META_WAYLAND_SURFACE_ROLE_CLASS (meta_wayland_zxdg_popup_v6_parent_class);
|
||||||
surface_role_class->post_apply_state (surface_role, pending);
|
surface_role_class->post_apply_state (surface_role, pending);
|
||||||
|
|
||||||
if (!pending->newly_attached)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!surface->buffer_ref->buffer)
|
if (!surface->buffer_ref->buffer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -611,9 +611,6 @@ wl_shell_surface_role_apply_state (MetaWaylandSurfaceRole *surface_role,
|
|||||||
if (!window)
|
if (!window)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!pending->newly_attached)
|
|
||||||
return;
|
|
||||||
|
|
||||||
input_region = meta_wayland_surface_calculate_input_region (surface);
|
input_region = meta_wayland_surface_calculate_input_region (surface);
|
||||||
if (!cairo_region_is_empty (input_region))
|
if (!cairo_region_is_empty (input_region))
|
||||||
{
|
{
|
||||||
|
@ -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);
|
META_WAYLAND_SURFACE_ROLE_CLASS (meta_wayland_xdg_toplevel_parent_class);
|
||||||
surface_role_class->post_apply_state (surface_role, pending);
|
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);
|
window_geometry = meta_wayland_xdg_surface_get_window_geometry (xdg_surface);
|
||||||
geometry_changed = !meta_rectangle_equal (&old_geometry, &window_geometry);
|
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)
|
if (!window)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!pending->newly_attached)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!surface->buffer_ref->buffer)
|
if (!surface->buffer_ref->buffer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user