Skip to content

x11: Fix BadDamage warning

Vlad Zahorodnii requested to merge work/xdamage-destroy-warning into master

The XDamageDestroy has a weird requirement saying that it can be called as long as the X11 window is still valid. On the other hand, one could argue that it is more intuitive if the damage handle becomes inert if the associated window is destroyed. Unfortunately, that's not the case and as git history shows, it's an easy way to shoot yourself in the foot, we had the exact warning many years ago.

The problem with the XDamageDestroy API is that it is simply unreliable given the asynchronous nature of communication between kwin and xorg.

Anyway, with X11 sunsetting, let's destroy the damage handle only when the X11 window is unmapped and not bother too much about it.

Merge request reports

Loading