Page MenuHome GnuPG

pinentry window does not stay on top
Closed, ResolvedPublic

Description

pinentry-gtk2 and pinentry-qt 0.7.6 do not stay on top of other windows.
This is a regression from earlier pinentries (from Kontact proko2 times
probably 0.7.3 or 0.7.4).
Tested window manager: KWIN (default manager of KDE3) on Etch.
(But problem also seen by Werner on openbsd? and on Lenny.)

Details

Version
0.7.6

Related Objects

Event Timeline

I have the same problem with Debian Sid on GNU/kfreebsd. Most likely due to
newer gtk or X11 libs.

(this is a regression we should fix for the customers.)

I can't replicate this with pinentry-qt 0.8.0 but still with the gtk2 version
with or without the Debian keyboard race fix.

Fixed in the current svn. At least it works for me on Debian GNU/Linux sid and
Debian GNU/kfreebsd sid. The pinentry nows sticks to the the top and you should
not be able to change this - it is in the responsibility of the WM, though. I
am using xfwm.

Note that it is possible to switch with the mouse and the desktop browser to a
different desktop but you should not be able to enter enything there unless you
used the -g option (no-grab in gpg-agent.conf); in fact pinentry may return a
CANCEL error if it can't grab the keyboard.

Let me know if I shall do a 0.8.1 release.

Testing pinentry Version: 0.8.0.svn231-0kk1
with window manager kwin from kdebase Version: 4:3.5.9.dfsg.1-6+lenny1.

Test a, gtk2 Version:
Improved:

pinentry-gtk-2 
getpin

bringing up a window which stays on top of on virtual desktop and grabs
the keyboard. Drawback: I can switch to other virtual desktops and even enter
data there. (This is acceptable I think).

Test 2 qt3 version:

pinentry-qt
getpin

brings up a window which also only works on one virtual desktop, but it
does not stay on top. When clicking on another window it goes to the background
and keeps the keyboard grabbed, so that the screen appears to hang.

So the issue is not fixed by that version.

bernhard removed a project: Restricted Project.May 19 2010, 2:52 PM
werner added a subscriber: lolo.

If you enter something on another desktop the pinentry should notice it and
return a cancel error. It all depends on the windows manager, though.

Werner, again see my tests with Kwin (default windows manager of KDE).
I believe that we should solve the issue for very common window managers.
KWin is very common for pinentry-qt3. Maybe we can ask some KDAB folks for help
on this one, should not be that hard I guess.

Am Dienstag, 8. Juni 2010 12:29:40 schrieb Marc Mutz:

so I've attached the diff to current
pinentry SVN here. Works for me. Kwin/qt3 from etch for Qt3-version,
Qt-4.4.3 (self-compiled) + kwin/qt3 for Qt4-version.

The docs say on some X11 WM's, this flag will have no effect when not also
WX11BypassWM is passed, but the latter robs pinentry of it's title bar and
borders, so I left it out.

Testing pinentry-qt Version: 0.8.0.svn234-0kk1 (the changelog indicates
that the change is in) on Debian Lenny with KWin from KDE 3.

pinentry-qt
getpin

First test: Clicking on other windows in one virtual desktop keeps the pinentry
dialog on top, but out of focus. Keystrokes still go in the pinentry-qt
windows, even when out of focus.
-> Good.

Second test: Switching to other virtual desktops: There is no pinentry dialog
and keystrokes reach the corresponding windows.
-> Accceptable, though different compared to the xfwm in T1162 (wk on May 07 2010, 06:09 PM / Roundup) .

So having a pinentry 0.8.1 with this fix in would be cool.

bernhard removed a project: Restricted Project.