1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
diff --git a/unix/xserver/hw/vnc/xorg-version.h b/unix/xserver/hw/vnc/xorg-version.h
index 9d1c0eb..79ff79a 100644
--- a/unix/xserver/hw/vnc/xorg-version.h
+++ b/unix/xserver/hw/vnc/xorg-version.h
@@ -52,8 +52,10 @@
#define XORG 118
#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (19 * 100000) + (99 * 1000))
#define XORG 119
+#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (20 * 100000) + (99 * 1000))
+#define XORG 120
#else
-#error "X.Org newer than 1.19 is not supported"
+#error "X.Org newer than 1.20 is not supported"
#endif
#endif
diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c
index 93d8af4..1517809 100644
--- a/unix/xserver/hw/vnc/xvnc.c
+++ b/unix/xserver/hw/vnc/xvnc.c
@@ -202,6 +202,7 @@ vfbBitsPerPixel(int depth)
static void vfbFreeFramebufferMemory(vfbFramebufferInfoPtr pfb);
+#if XORG < 120
#ifdef DPMSExtension
/* Why support DPMS? Because stupid modern desktop environments
such as Unity 2D on Ubuntu 11.10 crashes if DPMS is not
@@ -219,6 +220,7 @@ Bool DPMSSupported(void)
return FALSE;
}
#endif
+#endif
#if XORG < 111
void ddxGiveUp()
@@ -1491,6 +1491,12 @@ vfbCloseScreen(ScreenPtr pScreen)
#endif
}
+#if XORG >= 120
+static void vncDPMS(ScreenPtr pScreen, int level)
+{
+}
+#endif
+
static Bool
#if XORG < 113
vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
@@ -1661,6 +1667,9 @@ vfbScreenInit(ScreenPtr pScreen, int arg
if (!ret) return FALSE;
#endif
+#if XORG >= 120
+ pScreen->DPMS = vncDPMS;
+#endif
return TRUE;
|