diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-08 09:15:10 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-08 09:25:27 +0300 |
| commit | 27e607ab823c9838452c88bc2c83e91ef5a04191 (patch) | |
| tree | 700c3b51257418d8806450f68f401453779faa1b /src/layout/mod.rs | |
| parent | a2b27b8790e5e09edeb9933a785f4272efcb1734 (diff) | |
| download | niri-27e607ab823c9838452c88bc2c83e91ef5a04191.tar.gz niri-27e607ab823c9838452c88bc2c83e91ef5a04191.tar.bz2 niri-27e607ab823c9838452c88bc2c83e91ef5a04191.zip | |
layout: Return bool from activate_window()
Avoid an extra has_window() call.
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 7c573273..2b2c9fc1 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -1372,9 +1372,8 @@ impl<W: LayoutElement> Layout<W> { for (monitor_idx, mon) in monitors.iter_mut().enumerate() { for (workspace_idx, ws) in mon.workspaces.iter_mut().enumerate() { - if ws.has_window(window) { + if ws.activate_window(window) { *active_monitor_idx = monitor_idx; - ws.activate_window(window); // If currently in the middle of a vertical swipe between the target workspace // and some other, don't switch the workspace. |
