Skip to content

Commit

Permalink
Fix Linux Window Search Algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinyzu committed Apr 9, 2024
1 parent d8b1992 commit ff81d6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cdp_patches/input/os_base/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ def search_windows_by_pid(query_tree, pid: int):

for window in res_windows:
# Getting necessary window properties
title = window.get_property(name_atom, 0, 0, pow(2, 32) - 1)
parent_offset_coords = window.translate_coords(window.query_tree().parent, 0, 0)
window_x, window_y = parent_offset_coords.x, parent_offset_coords.y
title = window.get_property(name_atom, 0, 0, pow(2, 32) - 1).value
# parent_offset_coords = window.translate_coords(window.query_tree().parent, 0, 0)
# window_x, window_y = parent_offset_coords.x, parent_offset_coords.y

# Filter out non-browser windows, for example the Taskbar or Info Bars
if (b"google-chrome" in title) or (title == b"chrome"): # or (window_x == window_y) or not all((window_x, window_y))
Expand Down

0 comments on commit ff81d6b

Please sign in to comment.