Skip to content

Commit

Permalink
Recognize kAXFloatingWindowSubrole as windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitabobko committed Nov 5, 2023
1 parent 166424c commit 116d7fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tree/MacWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ final class MacWindow: Window, CustomStringConvertible {

private func isWindow(_ axWindow: AXUIElement) -> Bool {
let subrole = axWindow.get(Ax.subroleAttr)
return subrole == kAXStandardWindowSubrole || subrole == kAXDialogSubrole
return subrole == kAXStandardWindowSubrole ||
subrole == kAXDialogSubrole || // macOS native file picker ("Open..." menu) (kAXDialogSubrole value)
subrole == kAXFloatingWindowSubrole // telegram image viewer
}

func shouldFloat(_ axWindow: AXUIElement) -> Bool { // Note: a lot of windows don't have title on startup
Expand Down

0 comments on commit 116d7fd

Please sign in to comment.