Re-dock tray icons when tray manager is restarted#173
Conversation
Listen for MANAGER events about tray selection manager and then dock icons into the new dock area. New tray manager is supposed to sent such message after taking over the function of the old one. There is no need for undocking from the old one, as that's automatic - at the point the message is sent, old manager must be already destroyed and all its resources released. See https://tronche.com/gui/x/icccm/sec-2.html#s-2.8 for detailed interaction. This fixes tray icons in case of dock restart (rare on Xfce, but frequent on i3 - every config reload). For this work work reliably on i3, it needs also ignoring failure to send the dock message - dock may be restarted twice, introducing race condition (sending message to already destroyed dock). The code in fact ignores BadWindow error of any XSendEvent call, but in all the cases it's the same situation. Fixes QubesOS/qubes-issues#2242
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025122104-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025111104-4.3&flavor=update
Failed tests57 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/158999#dependencies 14 fixed
Unstable testsDetailsPerformance TestsPerformance degradation:32 performance degradations
Remaining performance tests:119 tests
|
|
@ben-grande nm-applet survived: https://openqa.qubes-os.org/tests/159348#step/i3_startup/14 |
I understand it is a different issues about items being blank, but it may help explain the issue:
Maybe test with other pre-intsalled applications that can appear on the tray such as KeepassXC (Qt, has to enable systray in the app) and volumeicon from sys-audio?
Then we would have a larger sample to see if it is related to the framework. |
It's indeed a different issue, please put it in appropriate place (QubesOS/qubes-issues#9945 ?) |
My comment was intended to help test if the tray icons disappear for Qt but not for GTK. Not pushing to fix the blank issue in this PR. |
Neither of those survive.
But those do. So, indeed looks to be toolkit related |
|
So, this solves only half of the problem, but I'm going to merge it anyway. The other half can be solved in another PR. |
Listen for MANAGER events about tray selection manager and then dock
icons into the new dock area. New tray manager is supposed to sent such
message after taking over the function of the old one. There is no need
for undocking from the old one, as that's automatic - at the point the
message is sent, old manager must be already destroyed and all its
resources released. See https://tronche.com/gui/x/icccm/sec-2.html#s-2.8
for detailed interaction.
This fixes tray icons in case of dock restart (rare on Xfce, but
frequent on i3 - every config reload).
For this work work reliably on i3, it needs also ignoring failure to
send the dock message - dock may be restarted twice, introducing race
condition (sending message to already destroyed dock). The code in fact
ignores BadWindow error of any XSendEvent call, but in all the cases
it's the same situation.
Fixes QubesOS/qubes-issues#2242