tigervnc/u_xserver118.patch

36 lines
1.0 KiB
Diff
Raw Normal View History

Subject: Support X server 1.18.0
Author: Michal Srb <msrb@suse.com>
Patch-Mainline: To be upstreamed
diff --git a/unix/xserver/hw/vnc/xorg-version.h b/unix/xserver/hw/vnc/xorg-version.h
index 8cc1c86..60610cb 100644
--- a/unix/xserver/hw/vnc/xorg-version.h
+++ b/unix/xserver/hw/vnc/xorg-version.h
@@ -48,8 +48,10 @@
#define XORG 116
#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (17 * 100000) + (99 * 1000))
#define XORG 117
+#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (18 * 100000) + (99 * 1000))
+#define XORG 118
#else
-#error "X.Org newer than 1.17 is not supported"
+#error "X.Org newer than 1.18 is not supported"
#endif
#endif
index 4c90a95..55befa7 100644
--- a/unix/xserver/hw/vnc/Input.c
+++ b/unix/xserver/hw/vnc/Input.c
@@ -300,8 +300,10 @@ static inline void pressKey(DeviceIntPtr dev, int kc, Bool down, const char *msg
#if XORG < 111
n = GetKeyboardEvents(eventq, dev, action, kc);
enqueueEvents(dev, n);
-#else
+#elif XORG < 118
QueueKeyboardEvents(dev, action, kc, NULL);
+#else
+ QueueKeyboardEvents(dev, action, kc);
#endif
}