patch for runner_lock to use kxkb kpart

Andriy Rysin arysin at
Sun Sep 30 02:15:55 BST 2007

Hi all,

I could not easily find who's current maintainer of krunner/lock so I am
sending my patch here.
Today I've pushed the code for kxkb kpart component and although some things
remain to be done it works pretty well (IMHO).

Currently as far as I know that's the only app which uses DBUS api for kxkb
and I'd like it to switch to kpart.
Attached is the patch to use kxkb kpart in lock password dialog instead of
DBUS interface. The patch is conservative - it makes USE_KXKB_PART define to
make switch between DBUS and KPart easy.

There are several (serious) advantages for using kpart instead of DBUS for
layout switcher:
- kxkb application does not have to be up for embedded indicator to show up
(it has to for DBUS API to work)
- as now we're switching groups instead of layouts, kpart indicator will
react to group switching made by XKB shortcuts (e.g. Ctrl+Shift) if they are
- in cases where it can be used in 'non-screensaver' environment where
switch can happen initiated from other places it'll try to be in synch with
current XKB state whether the switch is done with XKB shortcut, KDE
shortcut, other indicator or event with setxkbmap (DBUS version can't do
that now)
- we can have unique look and feel for all uses of layout indicator,
including displaying flags (if configured) and context menu, whether it's
tray icon of part of some dialog or even (possibly in future) part of window
title (currently DBUS interface provides choices in "layout(variant)" form
which is not what tray indicator shows)
- we don't have to keep separte code for DBUS and main indicator/switcher
- as kxkb is just display/switcher for XKB state in X server, rather than a
running server/service kpart it is (IMHO) more architecturally correct
approach than doing it with DBUS

There was going to be another use of kxkb DBUS interface in Parley ( though I hope that kpart could be more
appropriate there too. If that appears to be the case I'd consider removing
DBUS interface (by commenting it out just in case we really need it later)
from kxkb which will also has to make it more lightweight which (again IMHO)
is not the last characteristic keyboard layout indicator/switcher should
have :)

I would appreciate any comments or suggestions,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lockdlg_kxkb_kpart.patch
Type: text/x-patch
Size: 3080 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list