[PATCH 2/3] Init cursor size to 64x64 if drmGetCap() fails.

Alvaro Fernando García alvarofernandogarcia at gmail.com
Tue Jun 24 20:29:18 PDT 2014


Signed-off-by: Alvaro Fernando García <alvarofernandogarcia at gmail.com>
---
 src/compositor-drm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 4d23b7c..3c455bf 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1310,10 +1310,14 @@ init_drm(struct drm_compositor *ec, struct udev_device *device)
 	ret = drmGetCap(fd, DRM_CAP_CURSOR_WIDTH, &cap);
 	if (ret == 0)
 		ec->cursor_width = cap;
+	else
+		ec->cursor_width = 64;
 
 	ret = drmGetCap(fd, DRM_CAP_CURSOR_HEIGHT, &cap);
 	if (ret == 0)
 		ec->cursor_height = cap;
+	else
+		ec->cursor_height = 64;
 
 	return 0;
 }
-- 
2.0.0



More information about the wayland-devel mailing list