Skip to content

Commit

Permalink
Simplify WindowMRU::new
Browse files Browse the repository at this point in the history
Now that there is a more general Niri::lockin_focus method, leverage
it in WindowMRU.
  • Loading branch information
rustn00b committed Jan 19, 2025
1 parent b4ab021 commit 74ee34e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/niri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5269,14 +5269,7 @@ impl WindowMRU {
fn new(niri: &mut Niri) -> Self {
// update the timestamp on the currently active window and
// prepare a new WindowMRU
let now = niri.clock.now();
if let Some(m) = niri
.layout
.active_workspace_mut()
.and_then(|ws| ws.active_window_mut())
{
m.update_focus_timestamp(now);
}
niri.lockin_focus();

// and build a list of MappedId sorted by timestamp
let mut bh = BinaryHeap::new();
Expand Down

0 comments on commit 74ee34e

Please sign in to comment.