[PATCH] fix for potential signal/slot race condition in system tray

Friedrich W. H. Kossebau kossebau at kde.org
Sat Apr 26 04:09:34 CEST 2008


Hi,

while seeing if my brand new knowledge about the asynchronous nature of the 
QX11EmbedContainer::embedClient() could also help others in KDE I found not 
that but still some problems with race conditions in the system tray 
plasmoid.

The old code tried the embedClient() in the constructor of 
SystemTrayContainer, which could create some signals. But SystemTrayWidget 
only connects after constructing the SystemTrayContainer object to it's 
signals, so it might miss some theoretically. Or?

So I split the constructor and added an explicit call to embed the systray 
client. This did not yield any visual changes as far as I see (broken 
somewhere else?), but the logic should be better now.

Okay to commit?

At least remove the hidden code in the constructor of SystemTrayContainer, it 
is wrong, as the embedding is asynchronous. :)

Friedrich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixPotentialRaceConditioninSystemTray.patch
Type: text/x-diff
Size: 2777 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080426/c4bfe645/attachment.bin 


More information about the Panel-devel mailing list