Can Anki Mac *not* refocus itself when it finishes syncing?

Often when I’m done with Anki on Mac desktop, I trigger a sync and them hide the application. But when sync is done a second or two later, Anki un-hides itself. I don’t see any usability reason this would be necessary. There are no sync errors and no reason for the window to jump back onto the screen.

I’d simply like to be able to trigger sync, hide the app, and have it stay hidden. Would that be possible? This is a constant annoyance.

(Otherwise Anki is amazing and I rely on it extremely heavily!)

I’m using:
Version ⁨23.12.1 (1a1d4d54)⁩
MacOS 14.2.1 (23C71)

I don’t think Anki is explicitly refocusing itself after syncing. It’s probably a side effect of some Qt call, so this might need some investigation.

1 Like

I can’t seem to reproduce this - if I start a sync on macOS and select a different window that appears on top, Anki doesn’t come to the foreground when the sync completes (with the exception of the ‘sync complete’ pop-up). Have you tried without add-ons? Are you using the qt6 version?

I believe this is specific to hiding the app. That is how I repro.

As you saw, I also don’t repro if I just click over to another app while syncing.

@dae

I am using the qt6 version:

Version ⁨23.12.1 (1a1d4d54)⁩
Python 3.9.15 Qt 6.5.3 PyQt 6.5.3

I’m not sure I’m following. When you say “hide”, do you mean “minimize” - the yellow button in the top left? I’m not sure how you’re doing that, since while the sync progress window is visible, the main window is inaccessible, and will not respond to the yellow button.

It’s the standard Mac “hide” feature. Available via cmd+h, or in menu Anki → Hide Anki.

So to repro:

  1. Tap ‘y’ to sync
  2. Tap ‘cmd+h’ to hide the application

Result: when sync finishes, application pops back up, un-hiding itself.

1 Like

Can reproduce here

sorry for the ping, should have liked the post instead

1 Like

Thanks, I somehow had never noticed the hide feature before. It appears that the post-sync tooltip is what is triggering the window to display again. We could potentially make that configurable in the future if there was enough demand for it.

I’ve worked around this using a Keyboard Maestro macro, included below. I’m using AnkiConnect to trigger the sync. This also triggers a UI notification, but it has the advantage that it works when the hotkey “y” does not (e.g. if a New Card dialog is up). I didn’t find a Sync command in Anki menus.

Thanks for the responses!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.