diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-08-31 10:22:57 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-09-01 23:47:19 -0700 |
| commit | 0f522f209b415444fd97ba5ecf30c13c179cede7 (patch) | |
| tree | 94ba8fbeb9b35cf3837bf77f4a6cebffb00f497e /src/niri.rs | |
| parent | 30b213601a4f71d65a2227fa68ffb1ab2a69f671 (diff) | |
| download | niri-0f522f209b415444fd97ba5ecf30c13c179cede7.tar.gz niri-0f522f209b415444fd97ba5ecf30c13c179cede7.tar.bz2 niri-0f522f209b415444fd97ba5ecf30c13c179cede7.zip | |
Change MappedIt::get() to return u64
Diffstat (limited to 'src/niri.rs')
| -rw-r--r-- | src/niri.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/niri.rs b/src/niri.rs index 1a0669f1..ab5049a8 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -1379,7 +1379,7 @@ impl State { StreamTargetId::Window { id } => { let mut window = None; self.niri.layout.with_windows(|mapped, _, _| { - if u64::from(mapped.id().get()) != id { + if mapped.id().get() != id { return; } @@ -1502,7 +1502,7 @@ impl State { .expect("no X11 support") .wl_surface(); - let id = u64::from(mapped.id().get()); + let id = mapped.id().get(); let props = with_states(wl_surface, |states| { let role = states .data_map @@ -2841,9 +2841,7 @@ impl Niri { let mut to_stop = vec![]; for (id, out) in output_changed { let refresh = out.current_mode().unwrap().refresh as u32; - let target = CastTarget::Window { - id: u64::from(id.get()), - }; + let target = CastTarget::Window { id: id.get() }; for cast in self.casts.iter_mut().filter(|cast| cast.target == target) { if let Err(err) = cast.set_refresh(refresh) { warn!("error changing cast FPS: {err:?}"); @@ -3712,7 +3710,7 @@ impl Niri { }; let mut windows = self.layout.windows_for_output(output); - let Some(mapped) = windows.find(|win| u64::from(win.id().get()) == id) else { + let Some(mapped) = windows.find(|win| win.id().get() == id) else { continue; }; @@ -3759,7 +3757,7 @@ impl Niri { let mut window = None; self.layout.with_windows(|mapped, _, _| { - if u64::from(mapped.id().get()) != window_id { + if mapped.id().get() != window_id { return; } @@ -3778,7 +3776,7 @@ impl Niri { let mut windows = self.layout.windows_for_output(output); let mapped = windows - .find(|mapped| u64::from(mapped.id().get()) == window_id) + .find(|mapped| mapped.id().get() == window_id) .unwrap(); let scale = Scale::from(output.current_scale().fractional_scale()); |
