For some video cards, hardware rendered cursors fail to change properly.

Add a variable that users can use for these cards when starting Weston.

Also document in the man page
---
 man/weston.man       | 4 ++++
 src/compositor-drm.c | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/man/weston.man b/man/weston.man
index c5dc2f2..fd12938 100644
--- a/man/weston.man
+++ b/man/weston.man
@@ -267,6 +267,10 @@ This allows launching Weston as a nested server.
 For Wayland clients, holds the file descriptor of an open local socket
 to a Wayland server.
 .TP
+.B WESTON_FORCE_SW_CURSORS
+Set this variable to force Weston to use software cursors when under the 
+compositor-drm backend
+.TP
 .B WESTON_CONFIG_FILE
 Weston sets this variable to the absolute path of the configuration file
 it loads, or to the empty string if no file is used. Programs that use
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 0cdb8f4..ba12497 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1641,7 +1641,10 @@ drm_output_init_egl(struct drm_output *output, struct 
drm_compositor *ec)
                weston_log("cursor buffers unavailable, using gl cursors\n");
                ec->cursors_are_broken = 1;
        }
-
+       if (getenv("WESTON_FORCE_SW_CURSORS")
+       {
+               ec->cursors_are_broken = 1;
+       }
        return 0;
 }
 
-- 
2.1.0

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to