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

OS X improvements #4757

Closed

Conversation

sledgehammer999
Copy link
Member

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?

@kristofferR
Copy link

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.

@ghost
Copy link

ghost commented Feb 7, 2016

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.
To show the window, I have to right-click on Dock icon, choose "Show All Windows", then click on a very, very small window of qBittorrent.

@bean-drew
Copy link

As noted above and per #2126, the 3.4 alpha for #4757 (on OSX 10.11.4) still exhibits the problematic tray-minimize-restore behaviour. Thanks for all the continued efforts!

@sledgehammer999
Copy link
Member Author

As noted above and per #2126, the 3.4 alpha for #4757 (on OSX 10.11.4) still exhibits the problematic tray-minimize-restore behaviour. Thanks for all the continued efforts!

But how? In that version a tray icon doesn't exist? Only the dock icon.

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.
To show the window, I have to right-click on Dock icon, choose "Show All Windows", then click on a very, very small window of qBittorrent.

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.

@bean-drew
Copy link

@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.

@ghost
Copy link

ghost commented Feb 8, 2016

Just to clear things up:

  • I start qBittorrent. It shows an icon in the Dock, the bar full of icons at the bottom of the screen
  • I press the minimize button, like in Windows, to hide the program but leave it running

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.
Maybe a way to resolve this bug is to take the code from the "Show All Windows" menu item and paste it at the left-click on Dock icon event.

@sledgehammer999
Copy link
Member Author

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.

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.

@maddes
Copy link

maddes commented Feb 14, 2016

I can confirm this isn't working. v3.3.3 with OS X El Capitan 10.11.3.

  1. Open qbittorrent
  2. minimize (yellow button)
  3. left click qbittorent on the Dock: nothing happens.
  4. right click -> show: window shows

The tray icon (next to the clock) works funky too.

@sledgehammer999 sledgehammer999 modified the milestones: v3.3.4, v3.3.5 Mar 17, 2016
@barhom
Copy link
Contributor

barhom commented Apr 19, 2016

I can confirm this isn't working. v3.3.3 with OS X El Capitan 10.11.3.
Open qbittorrent
minimize (yellow button)
left click qbittorent on the Dock: nothing happens.
right click -> show: window shows
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?
@maddes

@bean-drew
Copy link

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!

@sledgehammer999
Copy link
Member Author

sledgehammer999 commented May 5, 2016

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.

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.

@sledgehammer999 sledgehammer999 modified the milestones: v3.3.5, v3.3.6 May 23, 2016
@sledgehammer999 sledgehammer999 modified the milestones: v3.3.6, v3.3.5 May 23, 2016
@sledgehammer999 sledgehammer999 modified the milestones: v3.3.6, v3.3.7 Jul 21, 2016
@sledgehammer999 sledgehammer999 modified the milestones: v3.3.7, v3.3.8 Sep 11, 2016
@sledgehammer999 sledgehammer999 modified the milestones: v3.3.8, v3.3.9, v3.3.10 Dec 14, 2016
@Necktwi
Copy link

Necktwi commented Dec 29, 2016

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.

@NewsGuyTor
Copy link

NewsGuyTor commented Feb 8, 2017

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.

@iliyang
Copy link

iliyang commented Apr 8, 2017

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!

@vit9696 vit9696 mentioned this pull request Jun 12, 2017
13 tasks
@sledgehammer999 sledgehammer999 deleted the osx_improvements branch August 15, 2017 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: macOS Issues specific to macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants