aboutsummaryrefslogtreecommitdiff
path: root/src/tty.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-09-03 11:34:38 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-09-03 11:34:38 +0400
commit3bd5a012cbf15bd294e1a6290914a6e687cbcf2d (patch)
treebf3bf88eb23f9a56fd91ce1af5f1f3b4d32fa27f /src/tty.rs
parent2187661ff82fdf377a767ee6a10f93b00fdbc286 (diff)
downloadniri-3bd5a012cbf15bd294e1a6290914a6e687cbcf2d.tar.gz
niri-3bd5a012cbf15bd294e1a6290914a6e687cbcf2d.tar.bz2
niri-3bd5a012cbf15bd294e1a6290914a6e687cbcf2d.zip
Add Mod+Ctrl+Shift+T to toggle debug tint
Diffstat (limited to 'src/tty.rs')
-rw-r--r--src/tty.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tty.rs b/src/tty.rs
index e07ec5cb..b45e456d 100644
--- a/src/tty.rs
+++ b/src/tty.rs
@@ -12,7 +12,7 @@ use smithay::backend::drm::{DrmDevice, DrmDeviceFd, DrmEvent, DrmEventTime};
use smithay::backend::egl::{EGLContext, EGLDisplay};
use smithay::backend::libinput::{LibinputInputBackend, LibinputSessionInterface};
use smithay::backend::renderer::gles::{GlesRenderer, GlesTexture};
-use smithay::backend::renderer::{Bind, ImportEgl};
+use smithay::backend::renderer::{Bind, DebugFlags, ImportEgl};
use smithay::backend::session::libseat::LibSeatSession;
use smithay::backend::session::{Event as SessionEvent, Session};
use smithay::backend::udev::{self, UdevBackend, UdevEvent};
@@ -192,6 +192,14 @@ impl Tty {
}
}
}
+ BackendAction::ToggleDebugTint => {
+ if let Some(device) = tty.output_device.as_mut() {
+ for (_, compositor) in &mut device.surfaces {
+ compositor
+ .set_debug_flags(compositor.debug_flags() ^ DebugFlags::TINT);
+ }
+ }
+ }
};
})
.unwrap();