updated sussy if logic
Browse files
+16 −28 src/window_manager.rs
| @@ -936,13 +936,10 @@ impl WindowManager { | |||
| 936 | .iter() | 936 | .iter() |
| 937 | .filter(|&&window| { | 937 | .filter(|&&window| { |
| 938 | let window_monitor_index = self.window_monitor.get(&window).copied().unwrap_or(0); | 938 | let window_monitor_index = self.window_monitor.get(&window).copied().unwrap_or(0); |
| 939 | - if window_monitor_index != monitor_index { | 939 | + if window_monitor_index != monitor_index |
| 940 | - return false; | 940 | + || self.floating_windows.contains(&window) |
| 941 | - } | 941 | + || self.fullscreen_windows.contains(&window) |
| 942 | - if self.floating_windows.contains(&window) { | 942 | + { |
| 943 | - return false; | ||
| 944 | - } | ||
| 945 | - if self.fullscreen_windows.contains(&window) { | ||
| 946 | return false; | 943 | return false; |
| 947 | } | 944 | } |
| 948 | if let Some(&tags) = self.window_tags.get(&window) { | 945 | if let Some(&tags) = self.window_tags.get(&window) { |
| @@ -2225,13 +2222,10 @@ impl WindowManager { | |||
| 2225 | .iter() | 2222 | .iter() |
| 2226 | .filter(|&&window| { | 2223 | .filter(|&&window| { |
| 2227 | let window_monitor_index = self.window_monitor.get(&window).copied().unwrap_or(0); | 2224 | let window_monitor_index = self.window_monitor.get(&window).copied().unwrap_or(0); |
| 2228 | - if window_monitor_index != monitor_index { | 2225 | + if window_monitor_index != monitor_index |
| 2229 | - return false; | 2226 | + || self.floating_windows.contains(&window) |
| 2230 | - } | 2227 | + || self.fullscreen_windows.contains(&window) |
| 2231 | - if self.floating_windows.contains(&window) { | 2228 | + { |
| 2232 | - return false; | ||
| 2233 | - } | ||
| 2234 | - if self.fullscreen_windows.contains(&window) { | ||
| 2235 | return false; | 2229 | return false; |
| 2236 | } | 2230 | } |
| 2237 | let monitor_tags = self.monitors.get(monitor_index).map(|m| m.selected_tags).unwrap_or(0); | 2231 | let monitor_tags = self.monitors.get(monitor_index).map(|m| m.selected_tags).unwrap_or(0); |
| @@ -2336,13 +2330,10 @@ impl WindowManager { | |||
| 2336 | .iter() | 2330 | .iter() |
| 2337 | .filter(|&&window| { | 2331 | .filter(|&&window| { |
| 2338 | let window_monitor_index = self.window_monitor.get(&window).copied().unwrap_or(0); | 2332 | let window_monitor_index = self.window_monitor.get(&window).copied().unwrap_or(0); |
| 2339 | - if window_monitor_index != monitor_index { | 2333 | + if window_monitor_index != monitor_index |
| 2340 | - return false; | 2334 | + || self.floating_windows.contains(&window) |
| 2341 | - } | 2335 | + || self.fullscreen_windows.contains(&window) |
| 2342 | - if self.floating_windows.contains(&window) { | 2336 | + { |
| 2343 | - return false; | ||
| 2344 | - } | ||
| 2345 | - if self.fullscreen_windows.contains(&window) { | ||
| 2346 | return false; | 2337 | return false; |
| 2347 | } | 2338 | } |
| 2348 | if let Some(&tags) = self.window_tags.get(&window) { | 2339 | if let Some(&tags) = self.window_tags.get(&window) { |
| @@ -2444,13 +2435,10 @@ impl WindowManager { | |||
| 2444 | .iter() | 2435 | .iter() |
| 2445 | .any(|&window| { | 2436 | .any(|&window| { |
| 2446 | let window_monitor_index = self.window_monitor.get(&window).copied().unwrap_or(0); | 2437 | let window_monitor_index = self.window_monitor.get(&window).copied().unwrap_or(0); |
| 2447 | - if window_monitor_index != monitor_index { | 2438 | + if window_monitor_index != monitor_index |
| 2448 | - return false; | 2439 | + || self.floating_windows.contains(&window) |
| 2449 | - } | 2440 | + || self.fullscreen_windows.contains(&window) |
| 2450 | - if self.floating_windows.contains(&window) { | 2441 | + { |
| 2451 | - return false; | ||
| 2452 | - } | ||
| 2453 | - if self.fullscreen_windows.contains(&window) { | ||
| 2454 | return false; | 2442 | return false; |
| 2455 | } | 2443 | } |
| 2456 | if let Some(monitor) = self.monitors.get(monitor_index) { | 2444 | if let Some(monitor) = self.monitors.get(monitor_index) { |