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