PanoramiX overlay resources contain physical window IDs for each
screen. Look them up as regular window resources when releasing the
client's overlay reference.
Signed-off-by: Xinhao Liu <liuxinhao@kylinsec.com.cn>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2259>
When AddResource() fails it calls the type's delete function, which for
pixmaps is dixDestroyPixmap() and drops one reference.
SingleCompositeNameWindowPixmap() increments pPixmap->refcnt before
AddResource(), so a failure only drops that extra reference. The Xinerama
path in ProcCompositeNameWindowPixmap() incremented it afterwards, so a
failure dropped the window's own reference to its backing pixmap and
could free it while still in use. Take the reference first, as the
single-screen path does.
Signed-off-by: Mason Green <mason@greenm01.net>
(cherry picked from commit 6240f6551c)