Skip to content

ui.windows(hidden=False) sometimes returns recently-minimized windows on macOS #501

Closed
@bobthecow

Description

@bobthecow

I'm running the current beta.

I can most easily reproduce the issue in Safari by minimizing a window while another app has focus (so focus doesn't return to the next Safari window). It seems to happen up to half of the time, and only recently minimized windows have this issue. Refocusing the app will sometimes (often?) clean up the windows which were erroring before.

The recently minimized windows error with UIErr: Could not get window rect. when trying to read or set Window.rect, e.g.

        windows = [win for win in ui.windows(hidden=False) if win.app.name == "Safari"]
        for win in windows:
            try:
                win.rect
            except:
                print(win)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions