Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Commit 94f8c5b

Browse files
fix: double icons in the dock bar on macOS (#65) (#79)
1 parent 7418d3a commit 94f8c5b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Tray/main.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ void exitApp() {
1616

1717
int main(int argc, char* argv[]) {
1818
#ifdef __APPLE__
19+
// Prevent Qt being too clever
20+
// See also https://github.com/qt/qtbase/blob/6.5.0/src/plugins/platforms/cocoa/qcocoaintegration.mm#L133-L139
21+
qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "1");
22+
23+
// Transform the process into a UI element application,
24+
// which doesn't have a Dock icon or menu bar.
1925
ProcessSerialNumber psn = {0, kCurrentProcess};
2026
TransformProcessType(&psn, kProcessTransformToUIElementApplication);
2127
#endif

0 commit comments

Comments
 (0)