diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index def50d8d8..49a4d2ded 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -756,6 +756,12 @@ ephyrScreenFini(KdScreenInfo * screen) } } +void +ephyrCloseScreen(ScreenPtr pScreen) +{ + ephyrUnsetInternalDamage(pScreen); +} + /* * Port of Mark McLoughlin's Xnest fix for focus in + modifier bug. * See https://bugs.freedesktop.org/show_bug.cgi?id=3030 diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h index 34ce4601b..e69178082 100644 --- a/hw/kdrive/ephyr/ephyr.h +++ b/hw/kdrive/ephyr/ephyr.h @@ -130,6 +130,9 @@ void void ephyrScreenFini(KdScreenInfo * screen); +void +ephyrCloseScreen(ScreenPtr pScreen); + void ephyrCardFini(KdCardInfo * card); diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index fac84cd13..3f66e1c2f 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -430,4 +430,6 @@ KdCardFuncs ephyrFuncs = { ephyrGetColors, /* getColors */ ephyrPutColors, /* putColors */ + + ephyrCloseScreen, /* closeScreen */ }; diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 9814fc66a..b5b91c0dd 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -621,8 +621,12 @@ KdCloseScreen(ScreenPtr pScreen) KdCardInfo *card = pScreenPriv->card; Bool ret; + if (card->cfuncs->closeScreen) + (*card->cfuncs->closeScreen)(pScreen); + pScreenPriv->closed = TRUE; pScreen->CloseScreen = pScreenPriv->CloseScreen; + if (pScreen->CloseScreen) ret = (*pScreen->CloseScreen) (pScreen); else diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index bec75cb6f..08b1681ce 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -130,6 +130,7 @@ typedef struct _KdCardFuncs { void (*getColors) (ScreenPtr, int, xColorItem *); void (*putColors) (ScreenPtr, int, xColorItem *); + void (*closeScreen) (ScreenPtr); /* close ScreenRec */ } KdCardFuncs; #define KD_MAX_PSEUDO_DEPTH 8