popupApplet and window focus

Björn Ruberg bjoern at ruberg-wegener.de
Sat May 23 23:08:03 CEST 2009

Dear devs,

I developed the virtual keyboard for plasma, called plasmaboard. You find it 

I have two issues with window focus. Plasmaboard needs the last active window 
to stay focused for being able to work. It just lets the X-Server send key 
events. If itself gets the focus after you click on it, plasmaboard will 
recive those key events and that is useless.

First issue:
Plasmaboard uses the class PopupApplet. When clicking on the icon, the 
keyboard appears. This keyboard must stay unfocused! So I used the method 
setPassivePopup(true). That worked great. But when I upgraded my working 
machine from Fedora 10 to Fedora 11 Preview it stopped working. Since then the 
opening keyboard steals focus from the window and is useless.
This may be a bug invented in qt-4.5 or kde-4.2.2 . setPasivePopup is rarely 
used, so it is possible that no one noticed.
Or is it my code? (What would be strange because I did not change it)

I'm a little confused by other applets that where meant to stay passive. The 
digital-clock for example opened a passive calendar popup. It still does on 
Ubuntu 9.04, it does not Fedora 10 (although it did earlier) or 11. Looking in 
the code I don't see a call to setPassivePopup(true). So, why the hell does it 
stay passive on Ubuntu? You see, I'm really confused.

Second issue:
My virtual keyboard can be dragged on the desktop of course. But it never 
worked there. Because it is no popup in the applet, it automatically gets 
focus when you click on a button on it. Is there a way to prevent it from 
stealing focus? And if not, can you implement one?
Plasmaboard can never work correctly if you don't. (Virtual keyboards may be 
the only plasmoid that do not want to get focused when clicked. They simply 
cannot work if they are)

Well. Hope you can help me.

Thanks for help and all the great work you already did for plasma!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20090523/74d36e1b/attachment.htm 

More information about the Plasma-devel mailing list