alt-tab-macos icon indicating copy to clipboard operation
alt-tab-macos copied to clipboard

Slack Huddle Window does not show in AltTab

Open adammw opened this issue 1 year ago • 11 comments

Describe the bug

Slack's Huddle Window does not show in AltTab.

Screenshots / video

Add screenshots to help explain your problem. You can also record your screen to show the bug in action. That is really helpful! Screenshot 2023-12-07 at 10 23 41 am Screenshot 2023-12-07 at 10 24 07 am

Steps to reproduce the bug

  1. Open Slack Desktop App
  2. Sign in, in a channel start a Huddle
  3. Click the open in pop out window button
  4. See that the new window cannot be alt-tabbed to

Your environment

  • AltTab version: 6.64.0
  • macOS version: 13.6.1 (22G313)
  • Other relevant info: 3xMonitor Setup, Alt-Tab configured to show all apps on all screens for visible spaces

I have managed to get it to show up once eventually after moving the window to various monitors and full screen, but have not been able to reproduce that.

adammw avatar Dec 06 '23 23:12 adammw

Hi,

I tried the steps and couldn't reproduce the issue. The window shows correctly for me.

Any idea about differences in a steps between the cases where it happens and the cases where it doesn't happen? You mentioned multiple monitors and fullscreen. We have a known issue today (#1324) where we can't see windows from other Spaces. So monitors and fullscreen could be the cause for you.

Thank you 🙇

lwouis avatar Dec 10 '23 07:12 lwouis

I can reproduce - this recently started happening to me.

AltTab 6.64.0 macOS 14.1.2

jameshfisher avatar Dec 12 '23 16:12 jameshfisher

This has been happening on my machine for quite a while - it sometimes works though, but I have no clue what triggers it.

AltTab 6.64.0 macOS 13.4

daedal-knickerbockers avatar Dec 13 '23 09:12 daedal-knickerbockers

There is something odd about Slack's Huddle window. see https://www.reddit.com/r/Slack/comments/166jth1/slack_huddles_window_management_on_mac/ I'd like them to fix their desktop app, rather than have every other app in the Mac ecosystem adapt to their hacky thingy. Ping those people https://github.com/slackhq ? idk...

FelDev avatar Dec 13 '23 14:12 FelDev

I did some previous work on macOS window management. Here's an example of an "odd" window:

let panel:NSPanel = NSPanel(
    styleMask: [
        NSWindow.StyleMask.nonactivatingPanel,
    ],
)

panel.collectionBehavior = [
    NSWindow.CollectionBehavior.canJoinAllSpaces,
    NSWindow.CollectionBehavior.fullScreenAuxiliary,
    NSWindow.CollectionBehavior.stationary
]

I'm guessing that the Slack Huddle window is an NSPanel, with some odd config in either its styleMask or collectionBehavior.

Does macOS provide a way to list all windows and their config? We'd soon see what's unusual about the Huddle window.

jameshfisher avatar Dec 13 '23 19:12 jameshfisher

( The UI for alt-tab-macos is itself an example of an "odd" window: https://github.com/lwouis/alt-tab-macos/blob/master/src/ui/main-window/ThumbnailsPanel.swift#L3-L26 )

jameshfisher avatar Dec 13 '23 19:12 jameshfisher

I think this is where alt-tab-macos gets its list of windows: https://github.com/lwouis/alt-tab-macos/blob/9e03d5f6659f0bf2327712e1e70851267acf01c1/src/api-wrappers/CGWindow.swift#L10

jameshfisher avatar Dec 13 '23 19:12 jameshfisher

I don't have time to dig further, but this CGWindowListCopyWindowInfo call is where I'd start

jameshfisher avatar Dec 13 '23 19:12 jameshfisher

@jameshfisher AltTab has to hide some UI elements like HUDs, popovers, some dialogs, etc. The huddle window is showing in AltTab sometimes. For me, 100% of times.

If AltTab is not showing it, it's either that they change properties of that window over time. For instance maybe they add an animation like the window starts as a HUD and morphs into a window. Apple Books.app was doing such things. We added a tracker to see when windows change state later on because of them. So it would have to be extra crazy/unexpected for AltTab to not pick it up. The other possibility is that there is something about other Spaces or Fullscreen. Those windows can't be detected (see #1324)

Slack has to fix this. Thousands of other apps show correctly in AltTab. It's on their side.

lwouis avatar Dec 13 '23 23:12 lwouis

I've found I can reproduce where it shows up correctly when starting alt-tab after the window is opened, but not if alt-tab is already running when the window is opened.

Screenshot 2023-12-22 at 10 50 15 am

adammw avatar Dec 21 '23 23:12 adammw

@adammw if the window is not shown by AltTab but then shown after AltTab is restarted it's likely that the window has changed after it spawn, and while at that time AltTab rejected it, it accepts it later. It seem to corroborate what I wrote above: https://github.com/lwouis/alt-tab-macos/issues/3042#issuecomment-1854860648

lwouis avatar Jan 02 '24 17:01 lwouis