popupApplet and window focus
bjoern at ruberg-wegener.de
Sat May 23 23:08:03 CEST 2009
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.
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.
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...
More information about the Plasma-devel