mimbrero / whatsapp-desktop-linux

Unofficial WhatsApp Linux client built with Electron.
https://flathub.org/apps/details/io.github.mimbrero.WhatsAppDesktop
MIT License
83 stars 21 forks source link

Tray Icon doesn't maximize from tray #13

Closed Rabioli closed 2 years ago

Rabioli commented 2 years ago

The tray icon works while closing, displaying conversations and minimizing, however it can't bring the program back to the desktop which makes it lose its whole purpose.

I am using gnome wayland while on void linux musl, additionally I am using a shell extension for displaying them.

gnome-shell version:GNOME Shell 41.4

Additionally, other tray icons work well, like nicotine+ or element and zim. I must mention that on click all of them display the option to "show" so that's what I use, whatsapp-desktop doesn't have that option, so the tray icon has no functionality for me.

I have a feature request to add a hide/show button on the tray icon, I could do it myself and create a pull request if I am pointed to which files I should modify to make this change.

mimbrero commented 2 years ago

Clicking the icon shows a context menu with open/minimize and quit options.

Are you using a touchpad? Try just tapping with 2 fingers the icon, and tell me if the menu shows up 😃

Rabioli commented 2 years ago

This is how it looks: https://wormhole.app/bW9jO#pDicVaFi0KUgwbRYhkhK0Q The minimize button only minimizes but doesn't bring it back up, is not a touchpad is a normal laptop.

mimbrero commented 2 years ago

is not a touchpad is a normal laptop

Sorry, I understood that the context menu wasn't showing up.

Something is telling Electron that the window is still focused. This is the code: https://github.com/mimbrero/whatsapp-desktop-linux/blob/ba4faa44d249a88760f1163d37e147a9459211f6/src/tray-manager.ts#L27-L35 I have tested this on all the computers I have access to... Can you try this on vanilla GNOME without those extensions? Also, try switching workspaces, closing other windows... to check if Electron notices that the window is no longer focused.