Skip to content

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

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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