what to do with xfdesktop

Jasper Huijsmans jasper at moongroup.com
Tue Nov 25 12:00:32 CET 2003


Hey all,

As you may know, I have been trying to get rid of the full-screen window
in xfdesktop, in order to allow other apps to paint on the root. And let
apps like rox pass clicks on their desktop windows on to the root window
(this works with my current test code, see below).

As a consequence I have now gone completely insane, trying to figure out
what is going on between X, gtk, gdk, xfwm4, xfdesktop and even
metacity.

This is what I found so far:

* using an input-only full-screen window breaks all kinds of apps
(xmag). This is what is currently in CVS.

* Trying to select input on the root window while xfwm4 is running gives
X errors.

* You can select input on the proxy window pointed to by the
_WIN_DESKTOP_BUTTON_PROXY property

* Strangely enough, metacity does not grab the root window (and doesn't
set the proxy window/property)

* The nicest way to get the events that I found is this:
- use gdk_event_handler_set() to get GdkEvents instead of gtk.
- in the event handler use gtk_main_do_event () to pass un-handled
events on to gtk.

There are still a number of problems.

* if run on startup (usual case) xfdesktop sometimes doesn't receive
events even though we got the correct window id for the proxy window and
we selected input on it after xfwm4 was initialized. This depends on
timing: sometimes it does work and running manually after startup always
works. 
Something happens to the window after starting xfwm4, but I have no idea
what.
To solve this I put in a timeout that selects input again after 5
seconds, which is incredibly ugly but does seem to work ;)

* I don't know how to tell whether a window manager stops running. This
is useful for telling when the user changes window manager.

* restarting xfwm4 works, because I check for changes in the proxy
window property.

* it works with metacity, because in that case I will select input on
the root window.

* it doesn't work if I change from xfwm4 to metacity because I get no
property notification for the proxy window property, so xfdesktop keeps
listening to events from the now non-existing proxy window.

* it also doesn't work changing from metacity to xfwm4, because xfwm4
refuses to start if xfdesktop has selected input on the root window and
I have no idea how to tell when metacity is killed.


My current code is available here:

http://members.home.nl/xfce4/files/xfdesktop-test-20031125.tar.bz2 (2MB)

If anyone has any ideas, please have a look. The interesting bits are
all in src/menu.c .


Anyway, that leaves us with the question of what to do with xfdesktop:

* keep the full-screen window like in 4.0.x: works, but no root-tail,
xpenguins, etc, and we don't really use the window for anything useful
(except catching mouse clicks).

* use the full-screen input-only window (current CVS): buys you nothing
except that xplanet works ;-) Many other programs do not, so I don't
think this is really acceptable.

* Use my test code that works with xfwm4 and metacity and simply don't
change wm's. Doesn't feel right, really.

* Only work with wm's that use a proxy window. This might be ok. In this
case perhaps it makes just as much sense to choose the next solution...

* Put the menu in xfwm4 and be done with it ;-) This will work, but I
don't think Olivier will like it ...


Please comment,

	Jasper




More information about the Xfce4-dev mailing list