[x11spice,10/10] Do not use show_cursor_check on older Xorg builds.

Submitted by Jeremy White on Sept. 16, 2019, 7:13 p.m.

Details

Message ID 20190916191333.27139-11-jwhite@codeweavers.com
State New
Headers show
Series "Provide a simulated set of outputs and crtcs" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Jeremy White Sept. 16, 2019, 7:13 p.m.
Versions prior to 1.20 do not have the show_cursor_check function.

Signed-off-by: Jeremy White <jwhite@codeweavers.com>
---
 spice-video-dummy/src/display.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Patch hide | download patch | download mbox

diff --git a/spice-video-dummy/src/display.c b/spice-video-dummy/src/display.c
index 786e6916..31be0416 100644
--- a/spice-video-dummy/src/display.c
+++ b/spice-video-dummy/src/display.c
@@ -113,10 +113,16 @@  dummy_crtc_hide_cursor(xf86CrtcPtr crtc)
 {
 }
 
+#if XF86_CRTC_VERSION > 7
 static Bool
+#else
+static void
+#endif
 dummy_crtc_show_cursor(xf86CrtcPtr crtc)
 {
+#if XF86_CRTC_VERSION > 7
     return TRUE;
+#endif
 }
 
 static Bool
@@ -141,8 +147,12 @@  static const xf86CrtcFuncsRec crtc_funcs = {
     .shadow_destroy = NULL,
     .set_cursor_colors = dummy_crtc_set_cursor_colors,
     .set_cursor_position = dummy_crtc_set_cursor_position,
+#if XF86_CRTC_VERSION > 7
     .show_cursor = NULL,
     .show_cursor_check = dummy_crtc_show_cursor,
+#else
+    .show_cursor = dummy_crtc_show_cursor,
+#endif
     .hide_cursor = dummy_crtc_hide_cursor,
     .load_cursor_image = NULL,
     .load_cursor_image_check = NULL,