diff --git a/Xi/extinit.c b/Xi/extinit.c index 02fffe574..a49a42152 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -1171,6 +1171,8 @@ IResetProc(ExtensionEntry * unused) free(xi_all_devices.name); free(xi_all_master_devices.name); + + XIBarrierReset(); } /*********************************************************************** diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c index fccab8615..6732ce9dc 100644 --- a/Xi/xibarriers.c +++ b/Xi/xibarriers.c @@ -917,3 +917,15 @@ XIBarrierInit(void) return PointerBarrierType; } + +void +XIBarrierReset(void) +{ + int i; + for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; + BarrierScreenPtr cs = GetBarrierScreen(pScreen); + free(cs); + SetBarrierScreen(pScreen, NULL); + } +} diff --git a/Xi/xibarriers.h b/Xi/xibarriers.h index 11e84ec9f..f61b48214 100644 --- a/Xi/xibarriers.h +++ b/Xi/xibarriers.h @@ -36,8 +36,8 @@ int XIDestroyPointerBarrier(ClientPtr client, xXFixesDestroyPointerBarrierReq * stuff); -Bool -XIBarrierInit(void); +Bool XIBarrierInit(void); +void XIBarrierReset(void); int SProcXIBarrierReleasePointer(ClientPtr client); int ProcXIBarrierReleasePointer(ClientPtr client);