aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc/vncHooks.c
diff options
context:
space:
mode:
authorJan Grulich <jgrulich@redhat.com>2017-05-04 08:58:37 +0200
committerJan Grulich <jgrulich@redhat.com>2017-05-04 08:58:37 +0200
commit994296ebd00bb26a171febaef749d102f747c1e9 (patch)
tree3d6a4a7a69f341a0e6e4003a403cbca532366739 /unix/xserver/hw/vnc/vncHooks.c
parenta88991bdc8154bda8a805755dd82cb71c93b35df (diff)
downloadtigervnc-994296ebd00bb26a171febaef749d102f747c1e9.tar.gz
tigervnc-994296ebd00bb26a171febaef749d102f747c1e9.zip
Make RandR callbacks optional as they were before
Diffstat (limited to 'unix/xserver/hw/vnc/vncHooks.c')
-rw-r--r--unix/xserver/hw/vnc/vncHooks.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/unix/xserver/hw/vnc/vncHooks.c b/unix/xserver/hw/vnc/vncHooks.c
index ef340b35..5b90f531 100644
--- a/unix/xserver/hw/vnc/vncHooks.c
+++ b/unix/xserver/hw/vnc/vncHooks.c
@@ -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