]> source.dussan.org Git - tigervnc.git/commitdiff
Make RandR callbacks optional as they were before 453/head
authorJan Grulich <jgrulich@redhat.com>
Thu, 4 May 2017 06:58:37 +0000 (08:58 +0200)
committerJan Grulich <jgrulich@redhat.com>
Thu, 4 May 2017 06:58:37 +0000 (08:58 +0200)
unix/xserver/hw/vnc/vncHooks.c

index ef340b359208203cc463b68b8ba590c9ec902eec..5b90f5311f6d57e47112fe95970c2e8edfb5a5eb 100644 (file)
@@ -312,9 +312,13 @@ int vncHooksInit(int scrIdx)
 #ifdef RANDR
   rp = rrGetScrPriv(pScreen);
   if (rp) {
-    wrap(vncHooksScreen, rp, rrSetConfig, vncHooksRandRSetConfig);
-    wrap(vncHooksScreen, rp, rrScreenSetSize, vncHooksRandRScreenSetSize);
-    wrap(vncHooksScreen, rp, rrCrtcSet, vncHooksRandRCrtcSet);
+    /* Some RandR callbacks are optional */
+    if (rp->rrSetConfig)
+      wrap(vncHooksScreen, rp, rrSetConfig, vncHooksRandRSetConfig);
+    if (rp->rrScreenSetSize)
+      wrap(vncHooksScreen, rp, rrScreenSetSize, vncHooksRandRScreenSetSize);
+    if (rp->rrCrtcSet)
+      wrap(vncHooksScreen, rp, rrCrtcSet, vncHooksRandRCrtcSet);
   }
 #endif