[git] Pinentry - branch, master, updated. pinentry-1.1.0-5-gfa817f0
by Andre Heinecke
cvs at cvs.gnupg.org
Mon Mar 5 12:18:15 CET 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The standard pinentry collection".
The branch, master has been updated
via fa817f00363cdc305728ece6139d76361c77f361 (commit)
from 141fd941a58f70692cb6244f011e54b005d2195c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fa817f00363cdc305728ece6139d76361c77f361
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Mon Mar 5 12:16:44 2018 +0100
qt: Try again to fix Windows Window Management
* qt/pinentrydialog.cpp (raiseWindow): Activate Window and
disable windows hacks.
(PinEntryDialog::PinEntryDialog): Delay setFocus after the
event loop returns.
--
This fixes getting the input focus on Windows without the
Buggy AttachThreadInput hacks.
diff --git a/qt/pinentrydialog.cpp b/qt/pinentrydialog.cpp
index 5212f88..d42ae4a 100644
--- a/qt/pinentrydialog.cpp
+++ b/qt/pinentrydialog.cpp
@@ -53,16 +53,13 @@
does not always work (e.g. when the ForegroundWindow timeout
has not expired.
- [ah 2018-02-28] Disabled this again in favor of using
+ [ah 2018-03-05] Disabled this again in favor of using
windows stays on top hint. The code that is in main
- setup_foreground_window.
-
- [ah 2018-03-01] Enabled this again because the focus did
- not change to the pinentry window without the attach
- thread input stuff. The setup_foreground_window helps though
- so that stays enabled.
+ setup_foreground_window. Additionally the setFocus
+ now works because it is posted after the window is shown
+ and our raise window also activates the pinentry window.
*/
-#ifdef Q_OS_WIN
+#if 0
WINBOOL SetForegroundWindowEx(HWND hWnd)
{
//Attach foreground window thread to our thread
@@ -83,10 +80,9 @@ WINBOOL SetForegroundWindowEx(HWND hWnd)
void raiseWindow(QWidget *w)
{
- /* Maybe Qt will become aggressive enough one day that
- * this is enough on windows too*/
+ w->activateWindow();
w->raise();
-#ifdef Q_OS_WIN
+#if 0
HWND wid = (HWND)w->effectiveWinId();
/* In the meantime we do our own attention grabbing */
if (!SetForegroundWindow(wid) && !SetForegroundWindowEx(wid)) {
@@ -210,7 +206,7 @@ PinEntryDialog::PinEntryDialog(QWidget *parent, const char *name,
connect(_edit, SIGNAL(textChanged(QString)),
this, SLOT(textChanged(QString)));
- _edit->setFocus();
+ QTimer::singleShot(0, _edit, SLOT(setFocus()));
QGridLayout *const grid = new QGridLayout(this);
int row = 1;
-----------------------------------------------------------------------
Summary of changes:
qt/pinentrydialog.cpp | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
hooks/post-receive
--
The standard pinentry collection
http://git.gnupg.org
More information about the Gnupg-commits
mailing list