Pinentry grabbing keyboard and mouse

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Pinentry grabbing keyboard and mouse

William L. Thomson Jr.
I was recently discussing the EFL/Enlightenment version of Pinentry
with the author of the patches previously sent to list, Mike
Blumenkrantz. Mike based his work off the GTK version. I opened a
task/ticket on the issue[1].

In looking at the QT and the newly added FLTK versions. I noticed
neither seem to be, unless I missed something, grabbing the keyboard
and mouse as the GTK version does.

I am not sure if that is legacy or the proper way. Or why other versions
do not seem to have that feature. Not sure if it is a requirement that
pinentry be blocking, take over keyboard and mouse. Such that the
window cannot be moved, nothing else done till passphrase entered,
confirmation, etc. Or that was just the choice of the GTK author at the
time of making that version.

Which is the correct way?
Is there a requirement on grabbing keyboard and mouse?
How come other versions seem to lack such feature?

I just want to be consistent with other versions. Also meet project
requirements, etc. I will be looking to further Mike's work to get it
accepted into Pinentry. Hopefully sooner than later, but I understand
this process can take some time.

Any information or assistance is greatly appreciated. Thank you!

--
William L. Thomson Jr.

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

attachment0 (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pinentry grabbing keyboard and mouse

Andre Heinecke
Hi,

On Thursday 13 April 2017 16:26:12 William L. Thomson Jr. wrote:

> In looking at the QT and the newly added FLTK versions. I noticed
> neither seem to be, unless I missed something, grabbing the keyboard
> and mouse as the GTK version does.
>
> I am not sure if that is legacy or the proper way. Or why other versions
> do not seem to have that feature. Not sure if it is a requirement that
> pinentry be blocking, take over keyboard and mouse. Such that the
> window cannot be moved, nothing else done till passphrase entered,
> confirmation, etc. Or that was just the choice of the GTK author at the
> time of making that version.
>
> Which is the correct way?
> Is there a requirement on grabbing keyboard and mouse?
> How come other versions seem to lack such feature?
Speaking for Qt I "recently" changed that behavior from a global grab to a
focus depending grab. Now only when the input field has focus the keyboard is
grabbed, with the intention to protect a bit against dumb keyloggers.

The discussion about this can be found here:

https://lists.gnupg.org/pipermail/gnupg-devel/2016-June/031277.html

The biggest concern speaking for the global grab was, as I understood it, that
it might help users not to enter their passphrase in the wrong window (e.g. a
chat window).

My personal opinion is that the usability cost of global grabbing from a popup
Window is too great for that advantage though. But others have different
Opinions.

> I just want to be consistent with other versions. Also meet project
> requirements, etc.

I don't think there is any grabbing requirement.

Regards,
Andre

--
Andre Heinecke |  ++49-541-335083-262  | http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

signature.asc (235 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pinentry grabbing keyboard and mouse

William L. Thomson Jr.
In reply to this post by William L. Thomson Jr.
I sent the below message a while back with no response. Though having
looked into the situation more. I have further relevant information.

As stated below, I am pretty sure the Qt 4 and 5, nor FLTK version of
pinentry grab the keyboard and mouse. Only the GTK one, and maybe Gnome
ones do grab keyboard and mouse.

Without going into discussion on such. There is one technical reason
why such may be the case. It is a technical reason why I feel the EFL
version of pinentry should not at this time grab keyboard or mouse.

I have to confirm, but seems grabbing keyboard and/or mouse is not
possible, and/or code exists for such when using Wayland. Which makes
such feature only X specific. That may be why Qt and/or FLTK does not
have grab support. It would not work under Wayland, only X, if both
can be supported without issue.

Regarding the EFL version of pinentry. To support X grab, requires X
specific code. Which can cause crash and issues under Wayland. Or nasty
if define conditionals. Which cannot always prevent some situations, and
still have crash/issues.  For EFL applications it is best to not use
platform specific code. It maybe running under Windows, or Apple cocoa,
in addition to X or Wayland, as an example. Not applicable to
EFL pinentry.

Either way I rather not bind EFL pinentry to X if it is not a
must. Thus for now, till at least Wayland has support for such, and an
abstract layer for both in EFL. The grab code will likely have to be
omitted from EFL pinentry. As it seems to be from QT and FLTK.

On Thu, 13 Apr 2017 16:26:12 -0400
"William L. Thomson Jr." <[hidden email]> wrote:

> I was recently discussing the EFL/Enlightenment version of Pinentry
> with the author of the patches previously sent to list, Mike
> Blumenkrantz. Mike based his work off the GTK version. I opened a
> task/ticket on the issue[1].
>
> In looking at the QT and the newly added FLTK versions. I noticed
> neither seem to be, unless I missed something, grabbing the keyboard
> and mouse as the GTK version does.
>
> I am not sure if that is legacy or the proper way. Or why other
> versions do not seem to have that feature. Not sure if it is a
> requirement that pinentry be blocking, take over keyboard and mouse.
> Such that the window cannot be moved, nothing else done till
> passphrase entered, confirmation, etc. Or that was just the choice of
> the GTK author at the time of making that version.
>
> Which is the correct way?
> Is there a requirement on grabbing keyboard and mouse?
> How come other versions seem to lack such feature?
>
> I just want to be consistent with other versions. Also meet project
> requirements, etc. I will be looking to further Mike's work to get it
> accepted into Pinentry. Hopefully sooner than later, but I understand
> this process can take some time.
>
> Any information or assistance is greatly appreciated. Thank you!
>
--
William L. Thomson Jr.

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

attachment0 (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pinentry grabbing keyboard and mouse

William L. Thomson Jr.
On Fri, 26 May 2017 13:42:59 -0400
Daniel Kahn Gillmor <[hidden email]> wrote:

> On Wed 2017-05-24 20:28:50 -0400, William L. Thomson Jr. wrote:
> > I sent the below message a while back with no response.  
>
> It looks to me like Andre Heinecke responded on Tuesday, April 18th.
> Did you not get that message?

I did not receive that message. I see it in the archives though. Thank
you for mentioning! The comments seem to go inline with my thoughts and
what I experienced using the QT version for a few years.

> > As stated below, I am pretty sure the Qt 4 and 5, nor FLTK version
> > of pinentry grab the keyboard and mouse. Only the GTK one, and
> > maybe Gnome ones do grab keyboard and mouse.  
>
> pinentry-gnome3 relies on gcr to do the system prompting, so takes its
> lead from that system.
>
> If your prompting system cannot grab the keyboard or mouse, then it
> makes sense to not support that feature ;)

Seems that Wayland lacks such ability to grab, or has grab API. Which
would make it an X only feature. Rather be consistent.

> pinentry-tty also does not grab the mouse, for example!
>
> if your prompting system is often used under X11, though, and the
> underlying program has asked to grab the kbd and/or mouse, then it's
> probably worthwhile to try to respect that request, if possible.

Ideally trying to make it portable between X and Wayland, without
having anything special for either.

> does that make sense?  I don't think anyone will blame you for not
> implementing something that is impossible to implement!

Sure, and it seems something that is very much personal preference.
Some prefer the blocking grab, others do not. A technical limitation
makes that easy :)

--
William L. Thomson Jr.

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

attachment0 (201 bytes) Download Attachment
Loading...