|
|
1e895f |
From f5ae26bb44c42369cbcf0a9b7da049222b5ecbf8 Mon Sep 17 00:00:00 2001
|
|
|
1e895f |
From: Olivier Fourdan <ofourdan@redhat.com>
|
|
|
1e895f |
Date: Fri, 10 Dec 2021 10:57:29 +0100
|
|
|
1e895f |
Subject: [PATCH 5/5] cursor-renderer/native: Add a means to disable HW cursors
|
|
|
1e895f |
|
|
|
1e895f |
When dealing with a faulty hardware or bugs in the driver, it might be
|
|
|
1e895f |
interesting to force the use of software cursors for debugging purposes.
|
|
|
1e895f |
|
|
|
1e895f |
Add a debug environment variable MUTTER_DEBUG_DISABLE_HW_CURSORS to
|
|
|
1e895f |
disable hardware cursors and force using software cursors.
|
|
|
1e895f |
|
|
|
1e895f |
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2046
|
|
|
1e895f |
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2150>
|
|
|
1e895f |
(cherry picked from commit 56939abd2f1691eea9edf85cb715ebf275944e7e)
|
|
|
1e895f |
---
|
|
|
1e895f |
src/backends/native/meta-cursor-renderer-native.c | 5 ++++-
|
|
|
1e895f |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
1e895f |
|
|
|
1e895f |
diff --git a/src/backends/native/meta-cursor-renderer-native.c b/src/backends/native/meta-cursor-renderer-native.c
|
|
|
1e895f |
index fcfe8eb98..237f9a3d5 100644
|
|
|
1e895f |
--- a/src/backends/native/meta-cursor-renderer-native.c
|
|
|
1e895f |
+++ b/src/backends/native/meta-cursor-renderer-native.c
|
|
|
1e895f |
@@ -1828,7 +1828,10 @@ meta_cursor_renderer_native_new (MetaBackend *backend,
|
|
|
1e895f |
|
|
|
1e895f |
priv->backend = backend;
|
|
|
1e895f |
|
|
|
1e895f |
- init_hw_cursor_support (cursor_renderer_native);
|
|
|
1e895f |
+ if (g_strcmp0 (getenv ("MUTTER_DEBUG_DISABLE_HW_CURSORS"), "1"))
|
|
|
1e895f |
+ init_hw_cursor_support (cursor_renderer_native);
|
|
|
1e895f |
+ else
|
|
|
1e895f |
+ g_message ("Disabling hardware cursors because MUTTER_DEBUG_DISABLE_HW_CURSORS is set");
|
|
|
1e895f |
|
|
|
1e895f |
return cursor_renderer_native;
|
|
|
1e895f |
}
|
|
|
1e895f |
--
|
|
|
1e895f |
2.35.1
|
|
|
1e895f |
|