aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-01-03 08:42:04 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-01-03 08:42:49 +0400
commit628891db2c8b0467f5dcf1f82be6db1570fea84b (patch)
treebafaf9bf1783a73be478aa51eae3db06cd8a8abf
parentbe6e25f5fb8d8f713512ef3e2ffbdfbb6e6dfe73 (diff)
downloadniri-628891db2c8b0467f5dcf1f82be6db1570fea84b.tar.gz
niri-628891db2c8b0467f5dcf1f82be6db1570fea84b.tar.bz2
niri-628891db2c8b0467f5dcf1f82be6db1570fea84b.zip
Add disable-cursor-plane debug flag
-rw-r--r--src/backend/tty.rs9
-rw-r--r--src/config.rs3
2 files changed, 11 insertions, 1 deletions
diff --git a/src/backend/tty.rs b/src/backend/tty.rs
index 52ef2a72..e0858e6b 100644
--- a/src/backend/tty.rs
+++ b/src/backend/tty.rs
@@ -573,6 +573,13 @@ impl Tty {
planes.overlay.clear();
}
+ // Cursor planes have bugs on some systems.
+ let cursor_plane_gbm = if config.debug.disable_cursor_plane {
+ None
+ } else {
+ Some(device.gbm.clone())
+ };
+
let egl_context = device.gles.egl_context();
let texture_formats = egl_context.dmabuf_texture_formats();
let render_formats = egl_context.dmabuf_render_formats();
@@ -596,7 +603,7 @@ impl Tty {
SUPPORTED_COLOR_FORMATS,
render_formats.clone(),
device.drm.cursor_size(),
- Some(device.gbm.clone()),
+ cursor_plane_gbm,
)?;
let dmabuf_feedback = DmabufFeedbackBuilder::new(device.id, texture_formats.clone())
diff --git a/src/config.rs b/src/config.rs
index 6b4b94cc..8127d9bb 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -379,6 +379,8 @@ pub struct DebugConfig {
pub enable_color_transformations_capability: bool,
#[knuffel(child)]
pub enable_overlay_planes: bool,
+ #[knuffel(child)]
+ pub disable_cursor_plane: bool,
}
impl Default for DebugConfig {
@@ -389,6 +391,7 @@ impl Default for DebugConfig {
wait_for_frame_completion_before_queueing: false,
enable_color_transformations_capability: false,
enable_overlay_planes: false,
+ disable_cursor_plane: false,
}
}
}