Requiring KApplication because of installX11EventFilter (was Re: KModifierKeyInfo moved to kdereview)

Michael Leupold lemma at confuego.org
Fri May 1 16:06:10 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lubos Lunak wrote:
> On Monday 27 of April 2009, Michael Leupold wrote:
>> Oswald Buddenhagen wrote:
>> > On Mon, Apr 27, 2009 at 10:12:56AM +0200, Michael Leupold wrote:
>> >> As far as I know new classes have to be used in 2 places in order to
>> >> be considered for adoption. I'd like to ask for an exception to this
>> >> rule.
>> >
>> > you don't have to ... just port kdm to use it. and when you are already
>> > at it, you can implement changing the lock state if you haven't yet. :D
>>
>> Good use-case as well. Currently KModifierKeyInfo relies on
>> KApplication::installX11EventFilter though which kdm currently doesn't
>> provide but it should be possible to install it manually - I'll look into
>> it.
> 
>  Wasn't the plan to make KApplication only some kind of an optional
> convenience extra that is not required? My memory is a bit hazy on this
> and I can't find it in the archives - does somebody remember?
> 
>  If that's the case, it should be instead implemented in Qt to have better
> support for X11 event filters. Recently there was a similar problem in
> kde-devel about KWindowSystem "not working".

I fiddled with it a little and made a prototypical implementation using 
QAbstractEventDispatcher (see attached patch). Seems to work alright. 
There's currently no need for it in 4.3 as the only place it's used is 
Plasma (which is a KApplication), but it could be used in 4.4 to make kdm 
use the new API.

Regards,
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFJ+w/klfpzINIAlVsRAnhXAJ0SCK0VX9ip37oksW2LK6NWWAjkNQCgkL83
uE6bUVT+zggCRtZjBGl9sx8=
=nj3N
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kmodifierkeyinfo-eventdispatcher.diff
Type: text/x-patch
Size: 3550 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090501/caff4d32/attachment.bin>


More information about the kde-core-devel mailing list