]> asedeno.scripts.mit.edu Git - PuTTY.git/commit - unix/gtkask.c
Don't defer displaying the prompt label in gtkask.
authorSimon Tatham <anakin@pobox.com>
Sat, 26 Sep 2015 10:09:20 +0000 (11:09 +0100)
committerSimon Tatham <anakin@pobox.com>
Sat, 26 Sep 2015 10:30:59 +0000 (11:30 +0100)
commit945837727580fbbbe615e5791e1e681c60501150
treeb41cc8e57d1487c957da9ed4f9b0f8b38803a4c4
parent777f38e4913f7e2ed54d87cb3f4acb4dafab2d1d
Don't defer displaying the prompt label in gtkask.

The previous sequence of events was that I would display the window
synchronously (via gtk_widget_show_now), so that I knew it was
actually on the screen and realised as an X window, and then I'd grab
the keyboard, and once the keyboard was grabbed, connect up the
keyboard event handlers and display the prompt.

I have to assume that deferring the display of the 'enter the
passphrase' prompt until the keyboard handlers were set up was
intended as some sort of 'not misleading the user' measure - don't
tell them to start typing until we're actually ready to start typing.
But unfortunately it has the side effect that the window is displayed
at a much smaller size before the prompt label appears, and centred on
the screen according to _that_ size - and then we display the prompt
label and the window resizes and is now off-centre. So I think it's
better not to try to be clever, and just make the window come up at
the right size initially.

(Actually, it looks as if nothing in the window is actually drawn
until that whole init function is finished anyway, so the prompt label
_already_ doesn't get physically displayed too early. So the whole
idea was pointless in the first place!)
unix/gtkask.c