tony / oxwm

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