mullvadvpn-app
mullvadvpn-app copied to clipboard
[Feature Request] Option to minimize to tray
Issue report
Operating system: Debian 11
App version: 2022.1
Issue description
Currently, the Mullvad window keeps existing if minimized. Please add an option to have it closed instead.
P. S. I would like to extend my thanks to Mullvad for providing Russian users with free VPN in these hard times.
We have a tray icon. But it's a bit problematic on Linux, due to different desktop environments wanting them to work differently etc. You might want to look at these instructions for help: https://github.com/mullvad/mullvadvpn-app/#tray-icon-on-linux
Tray icon works fine. I meant intercepting user minimizing window (by clicking minimize button, etc.) to close the instance of the window instead, something like you'll see in qBittorrent, Settings / Behavior: Minimize qBittorrent to notification area / Close qBittorrent to notification area. I am trained to expect the program to stop when I press the close button on window decorations and thus will instinctively choose the minimize button. However, keeping an instance of a window in a task bar for service programs rarely makes sense. Thus this pattern is sometimes employed.
Currently closing / quitting our frontend application equals disconnecting the VPN. It sends a disconnect event to the mullvad-daemon
as it exits. So we don't want to make it too easy to accidentally quit the app, since that can be risky for the user if the tunnel goes down. We want the unlocking of the unsecured internet to have to be a more explicit action by the user.
If we were to remove the automatic disconnect on app quit then we are in another confusing situation for users. Then they can close every visible aspect of Mullvad and still be connected to our tunnels. Or even worse, if they quit our app in some blocked/error state they will simply be locked out from any internet at all, but they can't view our error messages as they have quit our app.
Combining both of the above, we have come to the conclusion that the best way is probably that people leave our GUI running in the background at all times where they want to use Mullvad. We know our frontend process consumes some memory, this is unfortunate. But we don't have a better solution right now.
We could make it so that all the window resources are destroyed when the GUI is hidden to tray. That would probably make it use way less memory, but it would also make it noticeably slower to pop up again when opened.
That's... again, not what I meant. Or, well, I'm fairly sure, in KDE, if I click on the close button, the window, not the app is closed, or it is no longer displayed in the task bar, but Mullvad is still running and the tray icon is still there. If you're telling me the resources for GUI app are not deallocated when the window is closed... that's cool to know, but I don't see how this is, at all, relevant. I want to have an option to have minimize button to do the exact same thing as the close button.
P. S. The times I've been running 4GiB RAM machine are gone, but I do still remember Mullvad processes taking up full 10% of the real memory, even without an opened window. If you decide you want to optimize, consider that.
I get what you mean. But it feels strange to have two different buttons do the same thing. There are users who do want to minimize to task bar, and not to tray bar. If we do what you suggest all we do is remove functionality. So it's going to break the workflow for the people who want the app in the task bar. Please remember that on Linux not everyone have a traybar icon at all, so these people might need to minimize somewhere else.
As far as we know there is no way for us to figure out if the app shows a tray icon or not. The Electron APIs simply does not expose a way to probe for that, and all DEs work so vastly different :shrug:. So we have to kind of assume the user might not have a tray icon.
Yeah, even in qBittorrent, it is unchecked by default. This is why I suggest it as an option. As far as I know, this is a choice between having another checkbox and not having to "ah, crap, I minimized it again, I have to close it now since that's a window icon of a window which has no real reason to stay open". If you're worried about people having a constant visible access to Mullvad, isn't there already a "Start minimized" option? And, like, can't they just open a window by launching an instance any time they want? And doesn't clicking the close button already, well, cause the window to close?
Even if you "close" it, all resources for the window stays allocated. So it can open quickly again. So the only difference for you is whether or not there is an icon on your task bar or not. I personally don't think this is a large enough issue to justify another option. Option-bloat is also confusing to users.
But I'll forward this to the UI team and they can discuss it. However, they are on vacation, so this will likely not be acted on in quite a while.