birdtray icon indicating copy to clipboard operation
birdtray copied to clipboard

Becomes out of sync/unreactive when Thunderbird was opened by notification

Open haarp opened this issue 2 years ago • 6 comments

OS: Gentoo Linux Linux Desktop Manager: Xfce (xfce4-notifyd-0.9.1, xfwm4-4.18.0) Birdtray version: 1.11.4 Thunderbird version: 102.15.1 Birdtray origin: Ebuild Qt version: NA

Description When Thunderbird generates a new mail notifcation, it includes an "Activate" button. If the button is pressed, the Thunderbird is raised. In this state, Birdtray does not hide Thunderbird again when clicking on the tray icon. TB needs to be minimized manually first.

Expected behavior Birdtray should always be able to control the TB window

To Reproduce

  1. Enable new mail notifications
  2. Press "Activate" in notification once new mail arrives
  3. Try to hide TB again by clicking on the tray icon

Thanks a lot!

haarp avatar Sep 24 '23 22:09 haarp

Has there been any updates on this?

BeatLink avatar Nov 19 '23 12:11 BeatLink

No update since I don't use XFCE. Anyone else using it is invited to troubleshoot what happens in WindowTools_X11::hide() and why it doesn't hide again.

gyunaev avatar Nov 21 '23 01:11 gyunaev

Same issue and workaround with Birdtray 1.11.4 on Fedora 39 and MATE 1.26.2.

adatum avatar Jan 17 '24 01:01 adatum

Hello, I had the same issue with Birdtray 1.11.4 on Ubuntu 22.04 and GNOME 42.9.

After some testing, it appears that opening thunderbird via a new message notification does not trigger WindowTools_X11::show, so mHiddenStateCounter is not reset to 0. It implies that the condition of this if statement is false https://github.com/gyunaev/birdtray/blob/62e17bce9b777895ab7d23497351e2409aa37a34/src/windowtools_x11.cpp#L508

According to the few tests I did on my machine, the first term of the disjunction is sufficient and removing the mHiddenStateCounter == 0 test corrects the issue because, once in the tray, the first term becomes false.

However, I don't know if in the general case the second term can be ignored.

jboillot avatar Jan 26 '24 16:01 jboillot

@jboillot: Unfortunately can't confirm. I compiled Birdtray without the mHiddenStateCounter check and still couldn't get it to minimize to tray after activating via notification.

haarp avatar Jan 30 '24 00:01 haarp

@jboillot can confirm, this solves the issue for me (Arch,Xfce 4.18.0,xfce4-notifyd-0.9.4, Birdtray 1.11.4 (self-compiled), TB 115.9.0)

I've opened a PR

tehw0lf avatar Mar 25 '24 16:03 tehw0lf

Prob duplicate of #550

Paprikar avatar Jul 22 '24 03:07 Paprikar