saagarjha / Ensemble

Cast Mac windows to visionOS
https://testflight.apple.com/join/Pq1HzHqe
GNU Affero General Public License v3.0
847 stars 37 forks source link

Some apps missing from window list (e.g, Reeder) #38

Open grork opened 3 months ago

grork commented 3 months ago

Got on the TestFlight (yay!), and everything seemed to be working great except, some apps don’t seem to be enumerated in the list at all, so can’t be ‘ensemble’d.

  1. Start session on mac
  2. Starter Reeder.app
  3. Connect from visionOS
  4. Do not see reeder app listed, nor returned in search results
saagarjha commented 3 months ago

As far as I can tell the only filter I apply is whether the window has a title (and if's at a normal window level, which I generally expect to be the case): https://github.com/saagarjha/Ensemble/blob/5b761b5e2bd6ead7d6fe85a336ee090b7600fcff/visionOS/WindowPickerView.swift#L49. Does that apply here?

grork commented 3 months ago

I dug up some apple script to enumerate windows by apps, and captured the title for the Reeder window — indeed, it is ‘blank’. Here’s a capture of it’s output with a few windows open:

{"Application: Safari, Window: Display macOS Windows: Activity Monitor", "Application: Things3, Window: Today", "Application: Script Editor, Window: Untitled.scpt", "Application: Reeder, Window: No Title"}

Script that creates this:

tell application "System Events"
    set windowList to {}
    repeat with theProcess in (every application process whose background only is false)
        repeat with theWindow in (every window of theProcess)
            set windowName to ""
            try
                set windowName to name of theWindow as string
            end try
            if windowName is not "" then
                set end of windowList to "Application: " & (name of theProcess as string) & ", Window: " & windowName
            end if
            if windowName is "" then
                set end of windowList to "Application: " & (name of theProcess as string) & ", Window: No Title"
            end if
        end repeat
    end repeat
end tell

return windowList
saagarjha commented 3 months ago

Ok. That's good to confirm, but still…annoying. I'll see what I can do.