popupApplet and window focus
Aaron J. Seigo
aseigo at kde.org
Mon May 25 10:05:22 CEST 2009
On Saturday 23 May 2009, Björn Ruberg wrote:
> Dear devs,
> I developed the virtual keyboard for plasma, called plasmaboard. You find
> it here:
> 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.
well, it's more like "it's totally cool for popups to have focus" ... we'll
need some work-around for this for Plasmaboard. either that or else
Plasmaboard will have to provide and manage it's own popup instead of relying
on PopupApplet for this ....
> 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?
urf... this will probably require a nasty-ish hack like whenever the
graphicswidget gets focus checking for view() and then if view() un-focusing
it and hope that it un-focuses before the event hist the queue.
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Qt Software
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090525/27f4edb5/attachment-0001.sig
More information about the Plasma-devel