mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
askpass: don't treat releases of Ret or Esc as presses.
Caused an embarrassing failure just now trying to run the test program from a command prompt - I had Return still held down by the time it started up, and my release of it immediately terminated input :-)
This commit is contained in:
parent
5de81cb035
commit
454fe4fdf7
@ -61,9 +61,9 @@ static int last_char_len(struct askpass_ctx *ctx)
|
||||
static gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
||||
{
|
||||
struct askpass_ctx *ctx = (struct askpass_ctx *)data;
|
||||
if (event->keyval == GDK_Return) {
|
||||
if (event->keyval == GDK_Return && event->type == GDK_KEY_PRESS) {
|
||||
gtk_main_quit();
|
||||
} else if (event->keyval == GDK_Escape) {
|
||||
} else if (event->keyval == GDK_Escape && event->type == GDK_KEY_PRESS) {
|
||||
smemclr(ctx->passphrase, ctx->passsize);
|
||||
ctx->passphrase = NULL;
|
||||
gtk_main_quit();
|
||||
|
Loading…
Reference in New Issue
Block a user