Question about KDE_MULTIHEAD

Lubos Lunak l.lunak at suse.cz
Wed Apr 16 14:25:40 BST 2008


On Sunday 13 of April 2008, Michael Jansen wrote:
> Hi
>
> khotkeys has that code switching from the one kded module to one khotkeys
> standalone daemon per screen(?) .
>
> I got the impression this is done because of global shortcuts and mouse
> gestures. 	The grabbing has to be done on each screen ( that's my
> uneducated guess ).

 Correct. All windows in X are in a hiearchy where the topmost window 
containing all others is the root window. In order to grab a shortcut for all 
windows one has to create the grab on the topmost one. With non-Xinerama 
multihead, there is one root window per screen, and there is no common 
ancestor -> grab needs to be done per every screen.

> Questions:
>
> 1. Is KDE_MULTIHEAD still supported? I haven't found much informations
> about it using google, but got the impression it is still to be supported.

 That depends on your definition of "supported". It's basically just an ugly 
hack and it's never been really supported, it has just kind of worked. It's 
to be supported only about as much as somebody finds it important to work on 
it.

> 2. Is kdedglobalaccel ready to support it or is it not necessary for
> kdedglobalaccel to honor that environment variable.

 'No' and 'dunno', I guess.

> 3. Can someone please explain what kde does differently when that variable
> is set?

 Have a look e.g. at workspace/kwin/main.cpp. Basically, if $KDE_MULTIHEAD is 
enabled, basic desktop components fork once for each screen and handle only 
that screen (which also trivially handles things like the shortcut grabs and 
non-trivially introduces other problems). That's also why KHotKeys is 
normally a kded module (since it's trivial and small enough for it), but for 
multihead it's forked once per screen (there's only one kded, even with 
multihead).

 The proper fix should be probably handling multiple screens properly in all 
the relevant code, but I don't think anybody will find it worth the effort. 
So not wasting much of your effort on it either should be quite reasonable 
(since for the time being multihead must be pretty broken with KDE4 anyway, 
as e.g. Plasma doesn't support it at all).

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http://www.suse.cz




More information about the kde-core-devel mailing list