what to do with xfdesktop
jasper at moongroup.com
Tue Nov 25 12:00:32 CET 2003
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
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
* You can select input on the proxy window pointed to by the
* 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
Something happens to the window after starting xfwm4, but I have no idea
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
* 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:
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 ...
More information about the Xfce4-dev