detection if applet is running

Andriy Rysin arysin at gmail.com
Sat Oct 29 17:37:56 BST 2011


On 10/29/2011 06:38 AM, Aaron J. Seigo wrote:
> On Saturday, October 29, 2011 12:18:00 Ruurd Pels wrote:
>> On Friday 28 October 2011 12:46:38 Andriy Rysin wrote:
>>> Yes, but I can get the keyboard layouts from x11 directly (that's what
>>> applets and systray is doing), that'll be more efficient and would not
>>> require dbus or even kded daemon running
>> I think it would be preferred to use KDE functionality in this case. Why
>> pass by KDE and Qt and go directly to X11 to do that? That would also mean
>> that you would have to take into account that KDE and Qt run on different
>> platforms that handle keyboard layouts differently.
> agreed; we're already on our way to Wayland (excuse the pun? :) so this is a
> key concern. it's much nicer to port centralized code that then extends these
> changes automatically out to all applications (a prime design idea embodied in
> so many of our libraries) than to have to hunt down code all over the place
> and port them.
ideally yes, but if you look at CMakeLists.txt:

if(X11_Xkb_FOUND)
     add_subdirectory( keyboard )
endif(X11_Xkb_FOUND)

you could see it would not even compile without xkb. When I was 
rewriting keyboard layout indicator from scratch for KDE4.5 I initially 
was thinking to make it abstract from xkb and even from kde (trying to 
use qt classes only) so that other DEs and window systems could reuse 
it. Then reality came in :) If you get into details you could see that 
probably 70% of the keyboard module code is dealing with xkb 
configuration, quirks and problems. So there's not much of common code 
you could separate, and even if you do then you'll need to change kcm UI 
based on which backend features are available as good part of UI is also 
xkb-related.

Of course if somebody wants to try it - you're welcome, but being kxkb 
maintainer for almost 10 years I haven't seen anybody willing to step up 
and take over this job (despite several invitations from me in the past) :)

I am actually looking forward to Wayland so I can get rid of all this 
xkb uglyness, but in my opinion (as the author of the code) it's going 
to be way easier to keep a separate branch of the code, potentially even 
doing ifdef on the whole keyboard module.

Andriy





More information about the kde-core-devel mailing list