Skip to content

Commit

Permalink
implement get_active_window_meta()
Browse files Browse the repository at this point in the history
  • Loading branch information
jesicasusanto committed May 30, 2023
1 parent 4ea4ba8 commit 3ec8b1f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions openadapt/window/_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@


def get_active_window_state():
window = pgw.getActiveWindow()
if not window:
logger.warning(f"{window=}")
return None
title = window.title
geometry = window.box
meta = get_active_window_meta()
title = meta.title
geometry = meta.box
left, top, width, height = geometry
state = {
"title": title,
Expand All @@ -24,6 +21,12 @@ def get_active_window_state():
}
return state

def get_active_window_meta() :
window = pgw.getActiveWindow()
if not window:
logger.warning(f"{window=}")
return None
return window

def get_element_at_position(x, y):
# TODO
Expand Down

0 comments on commit 3ec8b1f

Please sign in to comment.