summaryrefslogtreecommitdiff
path: root/miext
diff options
context:
space:
mode:
Diffstat (limited to 'miext')
-rw-r--r--miext/sync/misync.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/miext/sync/misync.c b/miext/sync/misync.c
index d24921a18..b6914d18d 100644
--- a/miext/sync/misync.c
+++ b/miext/sync/misync.c
@@ -182,20 +182,21 @@ miSyncSetup(ScreenPtr pScreen)
&miSyncScreenDestroyFence
};
- if (dixPrivateKeyRegistered(syncScreenPrivateKey))
- return TRUE;
-
- if (!dixRegisterPrivateKey(syncScreenPrivateKey, PRIVATE_SCREEN,
- sizeof(SyncScreenPrivRec)))
- return FALSE;
+ if (!dixPrivateKeyRegistered(syncScreenPrivateKey)) {
+ if (!dixRegisterPrivateKey(syncScreenPrivateKey, PRIVATE_SCREEN,
+ sizeof(SyncScreenPrivRec)))
+ return FALSE;
+ }
pScreenPriv = SYNC_SCREEN_PRIV(pScreen);
- pScreenPriv->funcs = miSyncScreenFuncs;
+ if (pScreenPriv->funcs.CreateFence) {
+ pScreenPriv->funcs = miSyncScreenFuncs;
- /* Wrap CloseScreen to clean up */
- pScreenPriv->CloseScreen = pScreen->CloseScreen;
- pScreen->CloseScreen = SyncCloseScreen;
+ /* Wrap CloseScreen to clean up */
+ pScreenPriv->CloseScreen = pScreen->CloseScreen;
+ pScreen->CloseScreen = SyncCloseScreen;
+ }
return TRUE;
}