mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-29 17:08:20 +02:00
window: Only set opaque and input regions if they change
Setting these regions damages the entire window or causes a repick, which we don't want to trigger if we don't need to.
This commit is contained in:
parent
d3c0275b14
commit
63e5e06d82
1 changed files with 13 additions and 2 deletions
|
|
@ -818,8 +818,19 @@ window_attach_surface(struct window *window)
|
|||
return;
|
||||
}
|
||||
|
||||
wl_surface_set_input_region(window->surface, window->input_region);
|
||||
wl_surface_set_opaque_region(window->surface, window->opaque_region);
|
||||
if (window->input_region) {
|
||||
wl_surface_set_input_region(window->surface,
|
||||
window->input_region);
|
||||
wl_region_destroy(window->input_region);
|
||||
window->input_region = NULL;
|
||||
}
|
||||
|
||||
if (window->opaque_region) {
|
||||
wl_surface_set_opaque_region(window->surface,
|
||||
window->opaque_region);
|
||||
wl_region_destroy(window->opaque_region);
|
||||
window->opaque_region = NULL;
|
||||
}
|
||||
|
||||
wl_surface_damage(window->surface, 0, 0,
|
||||
window->allocation.width,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue