aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tty.rs')
-rw-r--r--src/backend/tty.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/tty.rs b/src/backend/tty.rs
index 58face27..5da9a604 100644
--- a/src/backend/tty.rs
+++ b/src/backend/tty.rs
@@ -783,6 +783,10 @@ impl Tty {
debug!("output is disabled in the config");
return Ok(());
}
+ if !niri.should_enable_laptop_panel(&output_name.connector) {
+ debug!("output is disabled because it is a laptop panel and the lid is closed");
+ return Ok(());
+ }
for m in connector.modes() {
trace!("{m:?}");
@@ -1723,7 +1727,7 @@ impl Tty {
.find(&surface.name)
.cloned()
.unwrap_or_default();
- if config.off {
+ if config.off || !niri.should_enable_laptop_panel(&surface.name.connector) {
to_disconnect.push((node, crtc));
continue;
}
@@ -1833,7 +1837,7 @@ impl Tty {
.cloned()
.unwrap_or_default();
- if !config.off {
+ if !config.off && niri.should_enable_laptop_panel(&output_name.connector) {
to_connect.push((node, connector.clone(), crtc));
}
}