birdtray icon indicating copy to clipboard operation
birdtray copied to clipboard

Thunderbird is not shut down when closing Birdtray

Open nicolamori opened this issue 5 years ago • 9 comments

OS: Archlinux Birdtray version: 1.7.0 Thunderbird version: Birdtray origin: Archlinux's AUR Qt version: 5.14.0-1

Description In the Hiding tab of the Birdtray settings window I checked the "Terminate Thunderbird when quitting Birdtray" option. But when I quit Birdtray (by right-clicking on the tray icon and choosing Quit) Thunderbird is not shut down. The only thing that happens is that the Thunderbird window is restored if it was hidden.

Expected behavior Thunderbird should be shut down.

To Reproduce

  1. Check all the options in the Hiding tab (I don't know if this is actually necessary, but I have all of them checked so it might be significant)
  2. Hide the Thunderbird window by minimizing it
  3. Quit Birdtray

nicolamori avatar Jan 14 '20 07:01 nicolamori

Please note that this only works if Thunderbird was started by Birdtray. If it was not, it won't terminate it.

Edit: not correct, should work even if not started by Birdtray.

gyunaev avatar Apr 05 '20 07:04 gyunaev

Hi, I confirm that this happens also when Thunderbird is started by Birdtray. I have checked the "Start Thunderbird When Birdtray starts" with a delay of 0 seconds "and hide it"; this has always been my setting. I launch Birdtray manually, Thunderbird is automatically started and when I close Birdtray using the "Quit" entry in the tray icon menu then Thunderbird is maximized but not shut down.

nicolamori avatar Apr 05 '20 16:04 nicolamori

I forgot to mention that I am currently on commit 56d63aa48, since I updated to test the fixes for #217

nicolamori avatar Apr 05 '20 16:04 nicolamori

  1. Hide the Thunderbird window by minimizing it

Is this step necessary or does it work if you don't hide it?

Abestanis avatar Apr 06 '20 21:04 Abestanis

@Abestanis It works the same also when not hiding the window: Birdtray is closed (the tray icon vanishes and there's no birdtray process running) but the Thunderbird window remains open. I added the detail of minimizing the window just to point out that the window is maximized when Birdtray is closed.

nicolamori avatar Apr 07 '20 07:04 nicolamori

It works for me. Can you please edit your src/windowtools_x11.cpp and add

sleep( 5 );

on line 446 (right after show() call)? You then will also need to add a line

#include <unistd.h>

at the beginning of this file, and test if it works?

Which window manager are you using?

gyunaev avatar May 04 '20 03:05 gyunaev

@gyunaev I tried patching as per your instructions, but it didn't help. The behavior is the same, the only difference being that the birdtray tray icon disappears after about 5 seconds instead of disappearing immediately. I am using KWin with an X11 session.

nicolamori avatar May 04 '20 07:05 nicolamori

Thank you. Does Birdtray hide and restore TB correctly when you left-click on the Birdtray icon?

gyunaev avatar May 04 '20 07:05 gyunaev

Yes, hide and restore with left click on tray icon works great.

nicolamori avatar May 04 '20 08:05 nicolamori