layout: Return bool from activate_window()

Avoid an extra has_window() call.
This commit is contained in:
Ivan Molodetskikh
2024-12-08 09:15:10 +03:00
parent a2b27b8790
commit 27e607ab82
3 changed files with 10 additions and 10 deletions
+1 -2
View File
@@ -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.