Refactor surface damaging and rendering code

This is based on code from Sway, which is also MIT licensed hence
compatible. This makes the surface damaging and rendering code easier to
follow and makes it easier to import future changes to Sway as well.
This commit is contained in:
Jente Hidskes 2019-12-26 12:00:51 +01:00
parent bfd7d605b8
commit b69431866f
No known key found for this signature in database
GPG key ID: 04BE5A29F32D91EA
10 changed files with 408 additions and 243 deletions

5
seat.c
View file

@ -1,7 +1,7 @@
/*
* Cage: A Wayland kiosk.
*
* Copyright (C) 2018-2019 Jente Hidskes
* Copyright (C) 2018-2020 Jente Hidskes
*
* See the LICENSE file accompanying this file.
*/
@ -586,7 +586,8 @@ drag_icon_damage(struct cg_drag_icon *drag_icon)
{
struct cg_output *output;
wl_list_for_each(output, &drag_icon->seat->server->outputs, link) {
output_damage_drag_icon(output, drag_icon);
output_damage_surface(output, drag_icon->wlr_drag_icon->surface,
drag_icon->lx, drag_icon->ly, true);
}
}