Skip to content

Commit dbd14ef

Browse files
committed
Make window sorting consistent based on PID
1 parent b76eb16 commit dbd14ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

NickBox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ def update_window_visualization(self):
11341134
target_windows = self.get_target_windows()
11351135
colors = self.generate_colors(99)
11361136

1137-
target_windows.sort(key=lambda w: (w.top, w.left))
1137+
target_windows.sort(key=lambda w: getattr(w, '_hWnd', id(w)))
11381138
for i, window in enumerate(target_windows):
11391139
if self.is_window_on_monitor(window, selected_monitor):
11401140
color = colors[i % len(colors)]

0 commit comments

Comments
 (0)