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

[In-app feedback] #3644

Closed
alt-tab-macos-bot opened this issue Oct 4, 2024 · 9 comments
Closed

[In-app feedback] #3644

alt-tab-macos-bot opened this issue Oct 4, 2024 · 9 comments

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: [email protected]

Message:

Hi there!
I have an issue where when I switch to an app/window the app shortcuts don't work as if the window isn't focused properly. When using the native app switcher I don't have this problem.
I'm haveing the issue with the app: Sprak Mail.
When you replay, I'd be happy to send a video demonstrating the issue along with steps to reproduce the issue and a link to Spark Mail.

Looking forward to hearing from you.

Thanks you.

Debug profile

  • App version: 6.72.0
  • App preferences:
    • MSAppCenter310AppCenterUserDefaultsMigratedKey: 1
    • MSAppCenter310CrashesUserDefaultsMigratedKey: 1
    • MSAppCenterInstallId: AF9F2EDC-87AF-4216-B8BF-86C81A7AB397
    • MSAppCenterNetworkRequestsAllowed: 0
    • MSAppCenterPastDevices: {length = 1144, bytes = 0x62706c69 73743030 d4010203 04050607 ... 00000000 00000384 }
    • MSAppCenterSessionIdHistory: {length = 460, bytes = 0x62706c69 73743030 d4010203 04050607 ... 00000000 00000156 }
    • MSAppCenterUserIdHistory: {length = 455, bytes = 0x62706c69 73743030 d4010203 04050607 ... 00000000 00000151 }
    • NSStatusItem Preferred Position Item-0: 530
    • NSWindow Frame SUStatusFrame: 535 587 400 135 0 0 1470 918
    • NSWindow Frame SUUpdateAlert: 425 390 620 398 0 0 1470 918
    • SUHasLaunchedBefore: 1
    • SULastCheckTime: 2024-10-03 19:42:38 +0000
    • SUUpdateRelaunchingMarker: 0
    • alignThumbnails: 1
    • cursorFollowFocusEnabled: true
    • fadeOutAnimation: true
    • hideThumbnails: false
    • hideWindowlessApps: true
    • holdShortcut: ⌘
    • holdShortcut2: ⌘
    • iconSize: 65
    • mouseHoverEnabled: true
    • preferencesVersion: 6.72.0
    • screensToShow: 1
    • showHiddenWindows: 1
    • showHiddenWindows2: 1
    • showMinimizedWindows: 1
    • showOnScreen: 1
    • startAtLogin: false
    • updatePolicy: 1
    • windowMaxWidthInRow: 20
    • windowMinWidthInRow: 20
  • Applications: 110
  • Windows: 16
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: true, 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: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
    • {isFullscreen: false, isWindowlessApp: false, isMinimized: false, isHidden: false, isTabbed: false, isOnAllSpaces: false, shouldShowTheUser: true, spaceId: 1, spaceIndex: 1}
  • OS version: Version 15.0 (Build 24A335)
  • OS architecture: arm64
  • Locale: en_US (fixed en_US)
  • Spaces: 1
  • Dark mode: Dark
  • "Displays have separate Spaces": checked
  • Hardware model: Mac15,12
  • Screens: 1
    • {x: 0.0, y: 0.0, width: 1470.0, height: 956.0}
  • CPU model: Apple M3
  • Memory size: 25.77 GB
  • Active CPU count: 8
  • Current CPU frequency: nil
  • Resource utilization:
    • CPU: 0.0%
    • Memory: 181M
    • Threads count: 12

@royhenengel
Copy link

Hi.
Steps to reproduce:

  1. Start when focused on any other app other than Spark Mail
  2. Using AltTab, switch to the Spark Mail window.
  3. Try using Spark Mail shortcuts like C or CMD + F. When switching to the app using AltTab the shortcuts won't work. The issue doesn't exist when using the native app switcher.

Here is a screen recording showing the issue:
https://github.com/user-attachments/assets/db900e9f-1b79-4bb6-a9ba-6e5841ffd008

@a4959
Copy link

a4959 commented Oct 8, 2024

Hello, I am not sure its relevant for your problem but in case it can help:
try to activate "Fade out animation" in alt tab(cant notice a visual diference... wich is good).
I had a issue with whatsapp not defocusing/ refocusing corectly with altab activated.
this solved the issue. (probably due to a slight timing that the animation gives.)
I hope this helps

@royhenengel
Copy link

royhenengel commented Oct 9, 2024

Hey @a4959.
Thanks for the suggestion. I'm still testing, but your suggestion does seem to solve the problem or at least makes it much better.
For me, though, it was the other way around. I had "Fade out animation" enabled, and disabling it helped.
Thanks a lot!

@a4959
Copy link

a4959 commented Oct 10, 2024

cool! Thats great to hear! I supose its an app specific problem, (somthing to do with timing... Maybe with updates the problem will go away.

@lwouis
Copy link
Owner

lwouis commented Oct 10, 2024

Hi,

I'm afraid this issue is on Spark Mail side. They may have a problem with the way they handle shortcuts. I think it has happened with a few other apps over the years, and every time it was a bug on their side.

Could you please contact their customer support? Feel free to link them to this issue here 👍

Thank you 🙇

@lwouis lwouis closed this as completed Oct 10, 2024
@royhenengel
Copy link

Hi @lwouis.
So, I've actually been trying to solve this issue for quite some time.
Like you, I also initially thought that the problem was also on their side.
Furthermore, I tried using another similar app switcher called Docflipper and encountered the same issue.
I don't know if linking them here is possible, but I have contacted them with all the screen recordings demonstrating the issue. I worked with them over a couple of weeks to find the problem (communicating back and forth and sending them logs).
We couldn't find the issue, and of course, they cannot ensure compatibility with every third-party app, just as you cannot.
Eventually, it came down to whether their app appropriately worked with the native MacOS app switcher, which I agree with.
Their app works correctly when using the native app switcher but not when using third-party app switchers.
Also, I haven't found anything that affects the issue other than enabling/disabling "Fade out animation" as @a4959 suggested.

I'd be happy to hear if you have suggestions on continuing debugging the issue, but I can't argue with them about the problem if their app works as expected with the system.

I am open to any feedback!

Thanks!

@lwouis
Copy link
Owner

lwouis commented Oct 10, 2024

Hey @royhenengel,

Thank you for your message

AltTab focus is different from the native app-switcher focus. The native app-switcher focus an app. It's similar to when you click on the app's icon on the Dock. It's not exactly the same, but it's similar in that the whole app is activated. AltTab on the other hand focuses just 1 window, most of the time.

AltTab uses private API and SPI to achieve this. Turns out it's not trivial to focus a window on macOS. There is no good way to do it using public APIs (see #447 for instance).

The tricks we use to focus windows could be pointed out, and we could say that they may create issues. It's true, they may. However, the vast majority of apps work fine. This leads me to believe that the outliers have incorrect implementation. That incorrect implementation may not be a problem most of the time, since macOS is app centric, not window-centric like Windows (e.g. the macOS Dock has app you click on; the Windows Dock has windows you click on).

Another to say it is that AltTab is probably just showcasing the existing incorrect implementation.

I've spent a lot of time working on the input management. I'm pretty confident that AltTab doesn't steal events from other apps. It doesn't mess with keyboard-focus in the apps either. I've refined this over the years, and it's quite battle-tested at this point. My guess again is that these apps have incorrect implementation. They may take some assumption. For instance that their app is activated when one of its window is focused. Which AltTab may bypass by focusing the window directly.

I hope this helps

Thank you 🙇

@royhenengel
Copy link

royhenengel commented Oct 20, 2024

Hi @lwouis, I hope all is well.
I'm having focus-related issues again, this time with WhatsApp.
When I switch apps using the native app switcher and return to WhatsApp, the test input field can gain focus, and I can write as usual.
When I switch apps using AltTab, and then return to WhatsApp, the test input field isn't able to gain focus, and I can't write as usual.
Is there anything that can be done about this, or do you have any suggestions?
Here is a video recording demonstrating the issue:
https://github.com/user-attachments/assets/b02704b9-bee7-44f7-a6f6-a85f778e4633

@royhenengel
Copy link

royhenengel commented Oct 21, 2024

Update

I just enabled/disabled the "Fade out animation" setting, and it looks like WhatsApp behaves as it should when this option is enabled.
So basically, the current status is:

  • When "Fade out animation" is enabled, Spark Email has issues, and WhatsApp works as expected.
  • When "Fade out animation" is disabled, WhatsApp has issues, and Spark Mail works as expected.

Here is a video recording demonstrating this:
https://github.com/user-attachments/assets/946ca688-386e-4650-9c2d-9ce651af1de8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants