! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfdesktop starts too fast in multi-screen setups
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description John Feuerstein 2011-06-25 17:16:53 CEST
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
Comment 1 Brian J. Tarricone (not reading bugmail) 2011-09-26 11:02:29 CEST
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...
Comment 2 Eric Koegel editbugs 2013-11-27 02:22:37 CET
I took the code from xfce4-panel and adapted it for xfdesktop:
http://git.xfce.org/xfce/xfdesktop/commit/?id=f8204f77cf48452b7021ee707369f6b69f322928

Bug #7769

Reported by:
John Feuerstein
Reported on: 2011-06-25
Last modified on: 2013-11-27

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
3 users

Version

Attachments

Wait for window manager on all screens (2.01 KB, patch)
2011-06-25 17:16 CEST , John Feuerstein
no flags

Additional information