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
OS X improvements #4757
OS X improvements #4757
Conversation
Closes qbittorrent#951, qbittorrent#2126, qbittorrent#3750 and qbittorrent#4129. See discussion in qbittorrent#3018.
Cool! The preview build works great, except for the problem you mentioned with the window not appearing again if it has been closed/minimized and the dock icon is clicked. |
Tested: qbittorrent_3.4.0alpha_for_issue_4757.dmg Indeed, on OS X, clicking on the Dock icon does not have the expected behaviour, to show the main window, if the window has previously been minimized. Only qBittorrent menu is loaded. |
But how? In that version a tray icon doesn't exist? Only the dock icon.
Is this with the version I posted? If yes, can you tell me the steps to reproduce the wrong behavior? Also please tell what is the expected behavior too. |
@sledgehammer999 The problem I'm noting is as follows, and pertains to the "qbittorrent_3.4.0alpha_for_issue_4757.dmg" version posted above in this thread (as well as prior versions incl. 3.3.3 and before): The anticipated behaviour is for a single-click on the dock icon to restore the app window of a minimized app. The observed behaviour is that once minimized to dock, the app window can only be restored from the dock by alt-clicking the icon, selecting "Show All Windows" and then selecting the window thumbnail that appears. However, single-click on the dock icon does give QBT focus, so the appropriate QBT menu appears next to the tray - only the app window itself does not restore. I can't comment on any issues with the tray icon as I've never tried that enabled. |
Just to clear things up:
When I need the window again, the expected behaviour is to left-click on qBittorrent icon from the Dock and see the window appear on the screen. Even with #4757, this does not happen. I click and click and the icon in the Dock blinks and the window cannot be seen. It is still minimized. |
This is very weird. I had tested this exact thing and it restored my window. I'll try it again the next days(no easy access to osx dev machine). Maybe I borked this with my next commits. |
I can confirm this isn't working. v3.3.3 with OS X El Capitan 10.11.3.
The tray icon (next to the clock) works funky too. |
I have tried these exact steps and the window does show. Maybe it is fixed? |
Hello! in 3.3.4 for OSX, the app window now minimizes and restores from the dock, so the wonky behaviour (it would minimize but not restore without alt-click, show all, select window) observed in my earlier posts appears to be fixed. Thanks! |
Great! That must be because I started using qt5 now. I haven't merge the changes of this PR yet. When I have more time I'll try to start fixing the rest of the OSX issues. |
v3.3.10 doesn't close to notification area: the dock icon remains in the dock. I have checked this behaviour in preferences. minimise and restore from dock is working good. close and restore from dock not working which is an absurd caused by dock icon sitting in the dock though we close it to notification area. |
Hi @sledgehammer999. Could you please compile a new alpha with these fixes? :) I've been using your build for a whole year now, since qBittorrent 3.3.10 isn't working properly on OS X as mentioned above. |
I found this thread when wondering why the dock icon is still visible when I close qBittorrent to the notification (i.e. menu bar) icon. Just like @Necktwi, when "Close qBittorrent to notification area" is checked in the options, I expect clicking the red X button on the menu to close the app window and hide the dock icon, leaving only the menu bar icon. It would be great to have this behavior! |
I have made changes to improve the OS X experience somewhat.
From the discussion on #3018 and by searching on google+stackoverflow I came to realize that the dock does most of the things we need. So I have disabled the system tray(icon in menu bar) on OS X.
Apps minimized can be restored from there. Actually I found out that if you programmatically hide a window, OS X cannot restore it by just clicking on the dock icon. That's why only the "Show" menu item from context menu worked. Because that called our code that unhides it.
Under OS X when you click the
X
button on the mainwindow it should just hide the window and not exit. Exit is done through the menus. That is what I am trying to do here. But it doesn't work. Normally when you click on the dock icon it should restore the window but in this case it doesn't.For devs: I think we get a showEvent when the dock icon is clicked. Then a show() in there should work. I am tired now, I will test this tomorrow.
I also hide the menu icons as per the Apple standard.
UPDATE: Can you guys test this PR with this build and report back?