mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
wayland/wl-shell: Use input region as window geometry if set
Historically, wl_shell clients used to pretend the input region was equivalent to the window geometry, so for "correctness" lets do that here too. This makes wl_shell clients with drop shadow behave marginally better than before. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
This commit is contained in:
parent
f7e256e9a1
commit
cb91f44ba4
@ -573,6 +573,7 @@ wl_shell_surface_role_commit (MetaWaylandSurfaceRole *surface_role,
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaWindow *window = surface->window;
|
||||
cairo_region_t *input_region;
|
||||
MetaRectangle geom = { 0 };
|
||||
|
||||
surface_role_class =
|
||||
@ -601,7 +602,17 @@ wl_shell_surface_role_commit (MetaWaylandSurfaceRole *surface_role,
|
||||
if (!pending->newly_attached)
|
||||
return;
|
||||
|
||||
meta_wayland_shell_surface_calculate_geometry (shell_surface, &geom);
|
||||
input_region = meta_wayland_surface_calculate_input_region (surface);
|
||||
if (!cairo_region_is_empty (input_region))
|
||||
{
|
||||
cairo_region_get_extents (input_region, &geom);
|
||||
cairo_region_destroy (input_region);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_wayland_shell_surface_calculate_geometry (shell_surface, &geom);
|
||||
}
|
||||
|
||||
meta_window_wayland_finish_move_resize (window,
|
||||
NULL,
|
||||
geom, pending->dx, pending->dy);
|
||||
|
Loading…
Reference in New Issue
Block a user