[PATCH] clients: Fix compositor version check for WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION

Chris Michael cpmichael at osg.samsung.com
Sun Dec 20 04:41:52 PST 2015


Signed-off-by: Chris Michael <cpmichael at osg.samsung.com>
---
 clients/simple-damage.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clients/simple-damage.c b/clients/simple-damage.c
index 37a81f5..24c67cc 100644
--- a/clients/simple-damage.c
+++ b/clients/simple-damage.c
@@ -262,7 +262,8 @@ create_window(struct display *display, int width, int height,
 		exit(1);
 	}
 
-	if (display->compositor_version < 4 &&
+	if (display->compositor_version <
+            WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION &&
 	    (flags & WINDOW_FLAG_USE_DAMAGE_BUFFER)) {
 		fprintf(stderr, "wl_surface.damage_buffer unsupported in "
 				"wl_surface version %d\n",
-- 
2.6.4



More information about the wayland-devel mailing list