MikeM gave me some debugging tips, which resulted in a fix for the nasty heisenbug. At least, I can't reproduce it anymore, no matter how many times I click the button. This patch also rolls up the patch that put the system tray in its own thread. Obviously, it obsoletes the last one I sent. ChangeLog: Support the XEMBED system tray protocol Run system tray in a separate thread thanks (for your patience ;) -mike