Created attachment 3752 Wait for window manager on all screens I'm running a 3 screen setup (no Xinerama, no Twinview, or similar) with no login manager. Starting XFCE4 using "startxfce4" from console sometimes results in missing background/wallpaper and missing icons on random screens. This is similar to the problem of xfce4-panel: https://bugzilla.xfce.org/show_bug.cgi?id=7161 xfdesktop should wait until the WM is ready on all screens while starting up. The attached monkey-patch demonstrates the problem: xfdesktop[2809]: starting up xfdesktop[2809]: [round 0] window manager ready on screen 0 xfdesktop[2809]: [round 0] window manager NOT ready on screen 1 xfdesktop[2809]: [round 0] window manager NOT ready on screen 2 xfdesktop[2809]: [round 1] window manager ready on screen 0 xfdesktop[2809]: [round 1] window manager ready on screen 1 xfdesktop[2809]: [round 1] window manager ready on screen 2 xfdesktop[2809]: [round 2] window manager ready on screen 0 xfdesktop[2809]: [round 2] window manager ready on screen 1 xfdesktop[2809]: [round 2] window manager ready on screen 2 ... vanilla xfdesktop continues directly at round 0, resulting in a missing backdrop and icons on screen 1 and 2 in this case. While the attached patch "fixes" this in my case, it's better to wrap this correctly in a loop with a timeout, like Nick did for xfce4-panel: https://bugzilla.xfce.org/attachment.cgi?id=3751
Hmm, the panel's method is ok, but I really don't like polling. It should be listening for SelectionNotify events on each of the root windows (probably in initialization of the XfceDesktop objects), and start that particular desktop on-demand. There of course should be a 5s timeout to start each desktop even if the WM doesn't start up in time. IIRC, getting SelectionNotify events in GDK is a pain in the ass, need to come up with a good way...
I took the code from xfce4-panel and adapted it for xfdesktop: http://git.xfce.org/xfce/xfdesktop/commit/?id=f8204f77cf48452b7021ee707369f6b69f322928