mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-28 16:50:13 +01:00
xwayland/window: Do not double add window to damage list
The window might be retained in the damage list after
`xwl_screen_post_damage` in certain conditions. This means we need to
check if the window is already in the list to avoid adding the same
window twice which will lead to list corruption resulting in server freeze
in `xwl_screen_post_damage`.
Signed-off-by: Minh Phan <phanquangminh217@gmail.com>
(cherry picked from commit ba644a64a4)
This commit is contained in:
parent
700ddafe0c
commit
f055285246
1 changed files with 2 additions and 1 deletions
|
|
@ -175,7 +175,8 @@ damage_report(DamagePtr pDamage, RegionPtr pRegion, void *data)
|
|||
}
|
||||
#endif
|
||||
|
||||
xorg_list_add(&xwl_window->link_damage, &xwl_screen->damage_window_list);
|
||||
if (xorg_list_is_empty(&xwl_window->link_damage))
|
||||
xorg_list_add(&xwl_window->link_damage, &xwl_screen->damage_window_list);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue