aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/pixmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/pixmap.c')
-rw-r--r--xorg-server/dix/pixmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xorg-server/dix/pixmap.c b/xorg-server/dix/pixmap.c
index 9163e99eb..241881262 100644
--- a/xorg-server/dix/pixmap.c
+++ b/xorg-server/dix/pixmap.c
@@ -148,6 +148,10 @@ PixmapPtr PixmapShareToSlave(PixmapPtr pixmap, ScreenPtr slave)
pixmap->drawable.height, depth, 0,
pixmap->devKind, NULL);
+ /* have the slave pixmap take a reference on the master pixmap
+ later we destroy them both at the same time */
+ pixmap->refcnt++;
+
spix->master_pixmap = pixmap;
ret = slave->SetSharedPixmapBacking(spix, handle);