Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some focused windows don't pop to the front #3823

Closed
alt-tab-macos-bot opened this issue Nov 7, 2024 · 34 comments
Closed

Some focused windows don't pop to the front #3823

alt-tab-macos-bot opened this issue Nov 7, 2024 · 34 comments
Labels
bug Something isn't working unactionable Further action is not possible due to lack of information or support unreproducible Need help from the author to reproduce the issue

Comments

@alt-tab-macos-bot
Copy link

This issue was opened by a bot after a user submitted feedback through the in-app form.

From: w2w2k2k2@gmail.com

Message:

This is the same as #3630

Problem: Selected window does not pop up to the front.

How to reproduce:

  • Open an app (e.g. Mac Calendar APP)
  • Close the window (CMD + W)
  • Re-open the window by click the APP icon (e.g. Calendar) in dock

Then you'll find when switching back to the window using Alt Tab, it does not pop to the front of screen

Debug profile

  • App version: 7.2.0
  • App preferences:
    • MSAppCenter310AppCenterUserDefaultsMigratedKey: 1
    • MSAppCenter310CrashesUserDefaultsMigratedKey: 1
    • MSAppCenterAppDidReceiveMemoryWarning: 1
    • MSAppCenterInstallId: A1EF5885-1DDF-4344-A200-7B300166ACD6
    • MSAppCenterNetworkRequestsAllowed: 0
    • MSAppCenterPastDevices: {length = 1150, bytes = 0x62706c69 73743030 d4010203 04050607 ... 00000000 0000038a }
    • MSAppCenterSessionIdHistory: {length = 460, bytes = 0x62706c69 73743030 d4010203 04050607 ... 00000000 00000156 }
    • MSAppCenterUserIdHistory: {length = 455, bytes = 0x62706c69 73743030 d4010203 04050607 ... 00000000 00000151 }
    • NSWindow Frame NSFontPanel: 2045 174 445 239 0 0 2560 1575
    • NSWindow Frame SUStatusFrame: 1304 1164 400 135 0 0 3008 1667
    • NSWindow Frame SUUpdateAlert: 1194 967 620 398 0 0 3008 1667
    • SUHasLaunchedBefore: 1
    • SULastCheckTime: 2024-11-06 18:39:34 +0000
    • SUUpdateGroupIdentifier: 992532835
    • SUUpdateRelaunchingMarker: 0
    • alignThumbnails: 1
    • appsToShow: 1
    • appsToShow3: 0
    • appsToShow4: 1
    • cancelShortcut:
    • crashPolicy: 2
    • fadeOutAnimation: true
    • hideWindowlessApps: true
    • holdShortcut: ⌥
    • holdShortcut2: ⌥
    • holdShortcut3: ⌘
    • holdShortcut4: ⌃
    • holdShortcut5: ⌃
    • iconSize: 64
    • maxHeightOnScreen: 76
    • maxWidthOnScreen: 90
    • nextWindowShortcut: `
    • nextWindowShortcut2: ⇥
    • nextWindowShortcut3: `
    • nextWindowShortcut4: `
    • nextWindowShortcut5:
    • preferencesVersion: 7.2.0
    • previewFocusedWindow: false
    • rowsCount: 3
    • screensToShow: 1
    • screensToShow3: 1
    • screensToShow4: 1
    • shortcutStyle: 0
    • showHiddenWindows: 2
    • showHiddenWindows2: 2
    • showHiddenWindows3: 2
    • showHiddenWindows4: 2
    • showMinimizedWindows: 1
    • showMinimizedWindows2: 1
    • showMinimizedWindows3: 1
    • showMinimizedWindows4: 1
    • showOnScreen: 1
    • spacesToShow: 1
    • spacesToShow3: 1
    • spacesToShow4: 1
    • updatePolicy: 1
    • windowDisplayDelay: 198
    • windowMaxWidthInRow: 25
    • windowMinWidthInRow: 22
  • Applications: 61
  • Windows: 50
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 205, spaceIndex: 5}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 205, spaceIndex: 5}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 205, spaceIndex: 5}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 205, spaceIndex: 5}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 4, spaceIndex: 2}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 172, spaceIndex: 5}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: true, isHidden: false, isTabbed: true, isOnAllSpaces: false, shouldShowTheUser: false, spaceId: 5, spaceIndex: 3}
  • OS version: Version 15.1 (Build 24B83)
  • OS architecture: arm64
  • Locale: en_US (fixed en_US)
  • Spaces: 5
  • Dark mode: Dark
  • "Displays have separate Spaces": checked
  • Hardware model: Mac15,11
  • Screens: 2
    • {x: 0.0, y: 0.0, width: 2560.0, height: 1600.0}
    • {x: -1728.0, y: -54.0, width: 1728.0, height: 1117.0}
  • CPU model: Apple M3 Max
  • Memory size: 38.65 GB
  • Active CPU count: 14
  • Current CPU frequency: nil
  • Resource utilization:
    • CPU: 0.0%
    • Memory: 133M-
    • Threads count: 15

@lwouis
Copy link
Owner

lwouis commented Nov 7, 2024

Hi @w2w2k2k2,

I can't reproduce this issue.

Do you use BTT, Karabiner, other apps which could interfere?
Could you please share a video?

Thank you 🙇

@lwouis lwouis added bug Something isn't working unreproducible Need help from the author to reproduce the issue labels Nov 7, 2024
@w2w2k2k2
Copy link

w2w2k2k2 commented Nov 7, 2024

@lwouis Will share a screen recording EOD today.
I do use Karabiner, but the problem persists even after I quite it.

@w2w2k2k2
Copy link

w2w2k2k2 commented Nov 8, 2024

@lwouis Please see the recording (next comment):

  • There are 2 apps opened: Calendar and Chrome. Each with one window
  • 0:00-0:10 I can switch between 2 windows using AltTab
  • 0:11 CMD-W to close the Calendar window. Calendar APP is still open
  • 0:16 Click Calendar APP icon in dock to open the window again
  • 0:18-0:24 Use AltTab to switch between 2 windows. But the Calendar window does not pop to the front

@w2w2k2k2
Copy link

w2w2k2k2 commented Nov 8, 2024

384189638-8489fdaf-ba1c-4d5a-85b1-7d8375957bed.mov

@lwouis
Copy link
Owner

lwouis commented Nov 8, 2024

Thank you for the video.
I did the exact same steps, and window focusing works for me. Maybe the difference is that you're running macOS 15.1 and I'm running 15.0.1. I'll update to 15.1 and try again.

@lwouis
Copy link
Owner

lwouis commented Nov 8, 2024

Retested on 15.1 and still works correctly. I don't have any idea how to debug this further, unfortunately

@lwouis lwouis added the unactionable Further action is not possible due to lack of information or support label Nov 8, 2024
@realCrush
Copy link

realCrush commented Nov 30, 2024

@lwouis I have the exact same issue, I tested several my most used APPs, and separate them into two groups:

have issue:

  • Calendar.app
  • Drafts.app
  • BoltAI.app
  • GoodLinks.app
  • Reeder.app
  • WeChat.app

works fine:

  • Mail.app
  • Gitfox.app

macOS: 15.1.1

After conducting these tests, I discovered that the apps with issues shared the same characteristic: when closed with Command+W and reopened, the app's interface lacked the "rendering" process. It seemed as though the app's main interface was merely "hidden" by Command+W.

Take Apple's native applications as an example: when you close and reopen Calendar.app using command+W, the main interface remains unchanged. In contrast, reopening Mail.app involves a process of loading emails along with corresponding animations. Although I'm not sure what causes this difference, I'm quite certain this discrepancy is the reason for the bug.

@lwouis lwouis changed the title [In-app feedback] Some focused window don't pop to the front Nov 30, 2024
@lwouis lwouis changed the title Some focused window don't pop to the front Some focused windows don't pop to the front Nov 30, 2024
@lwouis
Copy link
Owner

lwouis commented Nov 30, 2024

Perhaps these settings in System Settings > Desktop & Dock influence it?

image
image

@realCrush
Copy link

Perhaps these settings in System Settings > Desktop & Dock influence it?

image image

I tried all four combinations of these two buttons, and they had no effect on the behavior of the apps I listed :(

@lwouis
Copy link
Owner

lwouis commented Nov 30, 2024

@realCrush thank you for your hard work! It's a good thing that these settings are now confirmed to be neutral for this issue

@bangom
Copy link

bangom commented Dec 2, 2024

I have simillar problems, for example today I'm unable to switch to MS Teams app via alt-tab: on top menu bar I see correct App Name (Microsoft Teams), but other app window is in foreground (Word). It seems everythig is working OK for some time after macos reboot... maybe disconnecting and reconnecting from 2nd external monitor (extended desktop) via USB-C and therefore changing windows placement among Desktops is somehow a problem? Regularly there is problem switching between windows among same desktop and also two differend desktops. When I quit alt-tab and use original macos app switcher or mission control focusing the app works.

Note: On a build-in monitor I have only one macos Desktop, on external monitor I use two desktops... so total 3 separate desktops.

MacOS: 15.1.1, latest MS teams.

@pgrekovich
Copy link

pgrekovich commented Dec 7, 2024

I have the same issue after updating to Sequoia; now AltTab is almost unusable for me. I found a kind of workaround using a Hammerspoon script:

hs.application.watcher.new(function(appName, eventType, appObject)
    if eventType == hs.application.watcher.activated then
        local win = appObject:mainWindow()
        if win then
            win:focus()
        end
    end
end):start()

Still not working well enough for me, but maybe it will help someone.

Btw, I guess this issue connected with #3747

@realCrush
Copy link

@lwouis Update: after I uninstall CleanMyMac X on my Mac, everything works fine with the latest AltTab, unbelievable!

@w2w2k2k2
Copy link

w2w2k2k2 commented Dec 9, 2024

I bet some software affected MacOS and triggered this bug.

  • I have 2 macbook with same version of OS (15.1.1). One having the problem, the other does not.
  • But neither of my computers installed CleanMyMac :( Otherwise I would try to uninstall it...

@giorgiPapava
Copy link

I had similar issue at 14, 15.0 15.1

@snajper1677
Copy link

snajper1677 commented Dec 14, 2024

Its happening if you exist app with CMD+W and lunch it again, if you QUIT it and reopen it should work but after you use again CMD+W its happening again

@giorgiPapava
Copy link

Its happening if you exist app with CMD+W and lunch it again, if you QUIT it and reopen it should work but after you use again CMD+W its happening again

Yes it happens on most of the apps.

@snajper1677
Copy link

So is there any possibility of fixing it? or can we do someting make it better?

@tylerlaprade
Copy link

tylerlaprade commented Dec 19, 2024

I can repro this 100% of the time when attempting to switch to a full-screen Zoom meeting in which somebody else is screen-sharing.

@realCrush
Copy link

Sad news: I don't know the reason, but the bug appeared AGAIN and I didn't install CleanMyMac
AltTab version: latest

@SamadiPour
Copy link

SamadiPour commented Jan 11, 2025

I have no idea how this started or why it's happening. This issue began 1 to 2 weeks ago for no apparent reason. I didn't update the OS or install anything new.

As you can see from the image, I tried all of these previous versions, but none of them fixed the issue.

image

The only interesting observation was with versions 6.35.0 and 6.27.1. When I try to reproduce the issue by pressing Command + W to close the window and then reopening it, the app completely disappears from the menu.

Screenshot 2025-01-12-hNzFDjIy

As you can see in the image, Notion Calendar (and Telegram and Slack), is open. However, since I pressed Command + W for each of them, they have completely disappeared from the menu. The behavior may seem meaningless since the old versions might have been implemented differently, but I thought it would be worth sharing.

I also tried it with Finder but it was acting normal and as expected. The app/window might be handled differently at the OS level, but I'm not sure.

@superlevure
Copy link

In case it helps to debug, this issue only happens with the Slack app for me (macOS 15.2 (24C101), AltTab 7.18.0, Slack 4.41.105)

Unfortunately, it happens 90% of the time, which makes it really difficult to rely on AltTab..

@lwouis
Copy link
Owner

lwouis commented Jan 13, 2025

Hi,

I can't reproduce with any app, on my system. As discussed above. I think the issue lies with the specific apps. I believe this because of feedback like @superlevure. Slack has shown multiple issues already. We know it's a cross-platform Electron app. They do non-native behaviors on macOS, like when you close the window, it's not closed but hidden instead.

Please open tickets to these apps customer support, if possible. Nothing we can do on our side.

@SamadiPour your issue is different. It's #4108. Also, I installed Notion Calendar, and couldn't reproduce the issue on my machine.

Thank you

@tylerlaprade
Copy link

FWIW, I have not noticed the issue at all in the past week.

@superlevure
Copy link

I have stopped using AltTab for a few days now due to this bug with Slack, today I ran into the same issue with the default MacOS app switcher 😬

[..] I can't reproduce with any app, on my system. As discussed above. I think the issue lies with the specific apps.

That confirms your theory @lwouis, for my case at least

@s235784
Copy link

s235784 commented Jan 16, 2025

I may have found a solution:

  1. Change the appearance setting to "App Icons" or "Titles".
  2. Open the customize style menu.
  3. In the "Advanced" section, set "Show in Switcher" to "Applications".

@giorgiPapava
Copy link

I may have found a solution:

1. Change the appearance setting to "App Icons" or "Titles".

2. Open the customize style menu.

3. In the "Advanced" section, set "Show in Switcher" to "Applications".

you have no idea how much I have been trying to find solution, thanks!

@lwouis
Copy link
Owner

lwouis commented Jan 16, 2025

Careful that this is a workaround, not a replacement. Doing this means that AltTab will activate apps instead of focusing windows. It may work for your workflow, but it may not be what some people need.

Ideally focusing windows would work. It seems that either some apps have bugs in how they are implemented, or that the OS has bugs. I don't see anything actionable on AltTab side, unfortunately.

@garrucho
Copy link

Hi! Are there any logs that may help with that?

I've been working with "debug mode" enabled since yesterday to catch the bug, and here are the highlights:

– from Safari to Slack (nothing happens; I stay on Safari)

12:58:07 INFO ATShortcut.swift:73 executeAction() executeAction holdShortcut
12:58:07 INFO App.swift:123 focusTarget() 8632 * Unread Messages - 10 new items - Slack 92676 com.tinyspeck.slackmacgap
12:58:07 INFO App.swift:71 hideUi() true
12:58:07 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated
12:58:07 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 92676 Slack
12:58:07 DEBG RunningApplicationsEvents.swift:17 handleEvent() [(19609, "com.apple.WebKit.WebContent")]

– from Safari to Telegram (same thing)

12:58:12 INFO ATShortcut.swift:73 executeAction() executeAction holdShortcut
12:58:12 INFO App.swift:123 focusTarget() 21368 Telegram 40593 ru.keepcoder.Telegram
12:58:12 INFO App.swift:71 hideUi() true
12:58:12 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated
12:58:12 DEBG SystemPermissions.swift:73 checkPermissionsWhileAltTabIsRunning() granted granted true granted false false
12:58:12 DEBG SystemPermissions.swift:75 checkPermissionsWhileAltTabIsRunning() granted
12:58:12 DEBG SystemPermissions.swift:82 checkPermissionsWhileAltTabIsRunning() granted
12:58:12 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 40593 Telegram
12:58:12 DEBG RunningApplicationsEvents.swift:17 handleEvent() [(19628, "com.apple.WebKit.WebContent")]
Full log (line breaks by myself)
12:58:01 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 256) false NSEventModifierFlags(rawValue: 1048576)

12:58:02 DEBG SystemPermissions.swift:73 checkPermissionsWhileAltTabIsRunning() granted granted true granted false false
12:58:02 DEBG SystemPermissions.swift:75 checkPermissionsWhileAltTabIsRunning() granted
12:58:02 DEBG SystemPermissions.swift:82 checkPermissionsWhileAltTabIsRunning() granted

12:58:03 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated
12:58:03 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 38687 Safari

12:58:03 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
12:58:03 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
12:58:03 INFO AccessibilityEvents.swift:15 handleEvent() AXWindowCreated 21430
12:58:03 INFO AccessibilityEvents.swift:15 handleEvent() AXWindowCreated 21430

12:58:03 DEBG RunningApplicationsEvents.swift:17 handleEvent() [(19609, "com.apple.WebKit.WebContent")]
12:58:04 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 1048840) false NSEventModifierFlags(rawValue: 0)
12:58:05 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 down nil nil false NSEventModifierFlags(rawValue: 1048576)
12:58:05 INFO ATShortcut.swift:73 executeAction() executeAction nextWindowShortcut
12:58:05 DEBG App.swift:229 showUiOrCycleSelection() 0 0 true
12:58:05 DEBG AccessibilityEvents.swift:7 AltTab() AXFocusedWindowChanged
12:58:05 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
12:58:05 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 up nil nil false NSEventModifierFlags(rawValue: 1048576)
12:58:05 DEBG KeyRepeatTimer.swift:28 deactivateTimerForRepeatingKey() nextWindowShortcut
12:58:06 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 down nil nil false NSEventModifierFlags(rawValue: 1048576)
12:58:06 INFO ATShortcut.swift:73 executeAction() executeAction nextWindowShortcut
12:58:06 DEBG App.swift:229 showUiOrCycleSelection() 0 0 false

12:58:06 DEBG SystemPermissions.swift:73 checkPermissionsWhileAltTabIsRunning() granted granted true granted false false
12:58:06 DEBG SystemPermissions.swift:75 checkPermissionsWhileAltTabIsRunning() granted
12:58:06 DEBG SystemPermissions.swift:82 checkPermissionsWhileAltTabIsRunning() granted

12:58:06 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 up nil nil false NSEventModifierFlags(rawValue: 1048576)
12:58:06 DEBG KeyRepeatTimer.swift:28 deactivateTimerForRepeatingKey() nextWindowShortcut
12:58:07 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 256) false NSEventModifierFlags(rawValue: 1048576)

12:58:07 INFO ATShortcut.swift:73 executeAction() executeAction holdShortcut
12:58:07 INFO App.swift:123 focusTarget() 8632 * Unread Messages - 10 new items - Slack 92676 com.tinyspeck.slackmacgap
12:58:07 INFO App.swift:71 hideUi() true
12:58:07 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated
12:58:07 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 92676 Slack
12:58:07 DEBG RunningApplicationsEvents.swift:17 handleEvent() [(19609, "com.apple.WebKit.WebContent")]

12:58:07 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
12:58:07 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
12:58:07 INFO AccessibilityEvents.swift:15 handleEvent() AXWindowCreated 21430
12:58:07 INFO AccessibilityEvents.swift:15 handleEvent() AXWindowCreated 21430
12:58:07 DEBG RunningApplicationsEvents.swift:17 handleEvent() [(19628, "com.apple.WebKit.WebContent")]
12:58:10 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 1048840) false NSEventModifierFlags(rawValue: 0)
12:58:10 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 down nil nil false NSEventModifierFlags(rawValue: 1048576)
12:58:10 INFO ATShortcut.swift:73 executeAction() executeAction nextWindowShortcut
12:58:10 DEBG App.swift:229 showUiOrCycleSelection() 0 0 true
12:58:10 DEBG AccessibilityEvents.swift:7 AltTab() AXFocusedWindowChanged
12:58:10 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
12:58:10 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 up nil nil false NSEventModifierFlags(rawValue: 1048576)
12:58:10 DEBG KeyRepeatTimer.swift:28 deactivateTimerForRepeatingKey() nextWindowShortcut
12:58:11 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 down nil nil false NSEventModifierFlags(rawValue: 1048576)
12:58:11 INFO ATShortcut.swift:73 executeAction() executeAction nextWindowShortcut
12:58:11 DEBG App.swift:229 showUiOrCycleSelection() 0 0 false
12:58:11 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 up nil nil false NSEventModifierFlags(rawValue: 1048576)
12:58:11 DEBG KeyRepeatTimer.swift:28 deactivateTimerForRepeatingKey() nextWindowShortcut
12:58:11 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 down nil nil false NSEventModifierFlags(rawValue: 1048576)
12:58:11 INFO ATShortcut.swift:73 executeAction() executeAction nextWindowShortcut
12:58:11 DEBG App.swift:229 showUiOrCycleSelection() 0 0 false
12:58:11 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 up nil nil false NSEventModifierFlags(rawValue: 1048576)
12:58:11 DEBG KeyRepeatTimer.swift:28 deactivateTimerForRepeatingKey() nextWindowShortcut
12:58:12 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 256) false NSEventModifierFlags(rawValue: 1048576)

12:58:12 INFO ATShortcut.swift:73 executeAction() executeAction holdShortcut
12:58:12 INFO App.swift:123 focusTarget() 21368 Telegram 40593 ru.keepcoder.Telegram
12:58:12 INFO App.swift:71 hideUi() true
12:58:12 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated

12:58:12 DEBG SystemPermissions.swift:73 checkPermissionsWhileAltTabIsRunning() granted granted true granted false false
12:58:12 DEBG SystemPermissions.swift:75 checkPermissionsWhileAltTabIsRunning() granted
12:58:12 DEBG SystemPermissions.swift:82 checkPermissionsWhileAltTabIsRunning() granted

12:58:12 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 40593 Telegram
12:58:12 DEBG RunningApplicationsEvents.swift:17 handleEvent() [(19628, "com.apple.WebKit.WebContent")]

12:58:17 DEBG SystemPermissions.swift:73 checkPermissionsWhileAltTabIsRunning() granted granted true granted false false
12:58:17 DEBG SystemPermissions.swift:75 checkPermissionsWhileAltTabIsRunning() granted
12:58:17 DEBG SystemPermissions.swift:82 checkPermissionsWhileAltTabIsRunning() granted

12:58:18 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated
12:58:18 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 38687 Safari
12:58:19 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
12:58:19 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
12:58:19 INFO AccessibilityEvents.swift:15 handleEvent() AXWindowCreated 21430
12:58:19 INFO AccessibilityEvents.swift:15 handleEvent() AXWindowCreated 21430
12:58:19 DEBG RunningApplicationsEvents.swift:17 handleEvent() [(19668, "com.apple.WebKit.WebContent")]
12:58:20 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated
12:58:20 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 41989 Warp
12:58:20 DEBG RunningApplicationsEvents.swift:17 handleEvent() [(19668, "com.apple.WebKit.WebContent")]

It's painful because your app is basically the only good alternative for a decent "window switching" UX on MacOS, but it's completely broken for the main apps in my routine. 😞

@lwouis
Copy link
Owner

lwouis commented Jan 16, 2025

@garrucho Unfortunately logs can't help here. AltTab sends the focus order to the OS. What happens after that, it doesn't control. Please see #3823 (comment)

I'll close this ticket now. Sorry I couldn't do more 🙇

@lwouis lwouis closed this as completed Jan 16, 2025
@sascharucks
Copy link

sascharucks commented Jan 22, 2025

I am seeing the same problem. Mostly with Teams and Calendar. I have it on two different MacBooks. Only change I can remember in the last weeks is that I started using a Logitech Mouse with the Logi+ App, but the other computer isn't using that. I also started using Raycast around the same time. Maybe that helps.
After restarting AltTab it works again for some time.

@bangom
Copy link

bangom commented Jan 22, 2025

To me it seems that some apps don't respond correctly after some time to "bring the app window to the front" command. Can someone pinpoint this particular command? I was unable to bring to frond Cisco Webex app for some reason, also new Teams and Outlook. There is also problem with Parallels, when there is multiple monitor setup and multiple windows of same app opened (word) on different windows - wrong app window is focusing.

@lwouis, could you hepl with identifying:

  • what command causes the problem (focus particular app window vs app)... In the "Advanced" section, set "Show in Switcher" to "Applications" mode.
  • which non-native app platforms are causing this problem

Thank you.

@lwouis
Copy link
Owner

lwouis commented Jan 22, 2025

@bangom This is the method which handles the various types of focus/activation:

func focus() {
, depending on if we want to focus a window, activate an app, if the app has a bundleID or not, etc.

@duffpop
Copy link

duffpop commented Jan 28, 2025

This has been happening to me with a handful of apps, with Microsoft Teams being the most aggravating culprit. Strangely, I have accidentally "fixed" it with one of the below steps:

  1. I quit Raycast & AltTab.
  2. I reopened Raycast and used the "Switch Windows" built-in extension to focus on the Teams window, which worked immediately, focusing the Teams window as expected.
  3. I reopened AltTab and can now focus on Teams via AltTab (and via Raycast and the native macOS alt+tab window switcher).

I did absolutely nothing other than the above, and the trick seemed to be to use Raycast's Switch Window extension to focus on Teams once, and the expected behaviour now persists. I assume this means Raycast could be doing something funny, but my technical understanding ends at "weeeeeeeeee it works again".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unactionable Further action is not possible due to lack of information or support unreproducible Need help from the author to reproduce the issue
Projects
None yet
Development

No branches or pull requests