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

fix: Unsatisfactory "Close To Tray" behavior on macOS #300

Closed
shenlebantongying opened this issue Dec 29, 2022 · 0 comments · Fixed by #301
Closed

fix: Unsatisfactory "Close To Tray" behavior on macOS #300

shenlebantongying opened this issue Dec 29, 2022 · 0 comments · Fixed by #301
Labels
macOS Like most cross-platform projects, this one also lacks macOS developers. Help wanted.

Comments

@shenlebantongying
Copy link
Collaborator

shenlebantongying commented Dec 29, 2022

goldendict/goldendict#1356

I think I get the problem now.

The mainWindow is hidden() but never show() again. For macOS, there is no mainwindow anymore, thus clicking the dock cannot bring it back.

Changing this line to showMinimized() solves the problem, ⌘ F4 toggling will work.

https://github.com/xiaoyifang/goldendict/blob/8ffa1f66436ed13368d6e823abd86455e25afd21/mainwindow.cc#L2925-L2927

The hack is for win/linux in which the taskbar icon will disappear if a window is hide() but the tray is still there. We cannot do the same on macOS.


CRAZY FACT: @Arnie97 knows the reason since the beginning, wtf.

Screenshot 2022-12-29 at 10 13 28 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macOS Like most cross-platform projects, this one also lacks macOS developers. Help wanted.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant