aboutsummaryrefslogtreecommitdiff
path: root/src/handlers
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-09-03 12:13:04 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-09-03 13:48:08 +0300
commitf0157e03e72714264e684295fac226e2046f0b38 (patch)
tree7bfd198f59697704c5464c8498d3f8d7ff80131d /src/handlers
parent4b7c16b04a7c80f5f9b6fcbc4a1d8c9448dffbdb (diff)
downloadniri-f0157e03e72714264e684295fac226e2046f0b38.tar.gz
niri-f0157e03e72714264e684295fac226e2046f0b38.tar.bz2
niri-f0157e03e72714264e684295fac226e2046f0b38.zip
Use libdisplay-info for make/model/serial parsing, implement throughout
Diffstat (limited to 'src/handlers')
-rw-r--r--src/handlers/xdg_shell.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs
index 2486dd7a..48c798aa 100644
--- a/src/handlers/xdg_shell.rs
+++ b/src/handlers/xdg_shell.rs
@@ -41,7 +41,7 @@ use crate::input::DOUBLE_CLICK_TIME;
use crate::layout::workspace::ColumnWidth;
use crate::niri::{PopupGrabState, State};
use crate::utils::transaction::Transaction;
-use crate::utils::{get_monotonic_time, send_scale_transform, ResizeEdge};
+use crate::utils::{get_monotonic_time, output_matches_name, send_scale_transform, ResizeEdge};
use crate::window::{InitialConfigureState, ResolvedWindowRules, Unmapped, WindowRef};
impl XdgShellHandler for State {
@@ -668,7 +668,12 @@ impl State {
rules
.open_on_output
.as_deref()
- .and_then(|name| self.niri.output_by_name.get(name))
+ .and_then(|name| {
+ self.niri
+ .global_space
+ .outputs()
+ .find(|output| output_matches_name(output, name))
+ })
.and_then(|o| self.niri.layout.monitor_for_output(o))
});