Hi everyone,
I'm developing a Zotero plugin and got a bug report about ProgressWindow staying visible when Zotero is minimized to the dock on macOS. The progress popup floats above all other apps, which is confusing for users.
I traced it to progressWindow.js line 130:
_progressWindow = _window.openDialog("chrome://zotero/content/progressWindow.xhtml",
"", "chrome,dialog=no,titlebar=no,alwaysontop=yes");
The "alwaysontop=yes" keeps it above everything, even when Zotero is minimized.
I noticed progressQueueDialog.js uses "dependent" instead, which correctly makes the window follow its parent when minimizing on macOS.
From the plugin side I tried:
- Setting win.opener = mainWindow after creation (doesn't affect z-level)
- Modifying xulWin.zLevel to normalZ (read-only after creation)
- Creating custom window with "dependent" (works but requires reimplementing all ProgressWindow functionality)
A few questions:
- Is there a recommended way for plugins to show progress that respects macOS window management?
- Would changing "alwaysontop=yes" to "dependent" in progressWindow.js be reasonable for macOS? Or is there a specific reason alwaysontop is used?
- Is there an alternative API I should use for long-running operations?
Happy to submit a PR if there's interest in changing the core behavior.
Thanks!
References: