From cfcbe821382569496ee780e417c7ed8e87f7971f Mon Sep 17 00:00:00 2001 From: sniperbeamer Date: Sat, 31 May 2008 14:43:47 +0000 Subject: [PATCH] Fixed problem when restoring window after auto-type (closes #1978861) git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@202 b624d157-de02-0410-bad0-e51aec6abb33 --- src/lib/AutoType_X11.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/AutoType_X11.cpp b/src/lib/AutoType_X11.cpp index 87b68f7..03bef09 100644 --- a/src/lib/AutoType_X11.cpp +++ b/src/lib/AutoType_X11.cpp @@ -130,7 +130,7 @@ void AutoType::perform(IEntryHandle* entry, QString& err,bool hideWindow,int nr) if (Keys[i].type==TypeKey){ int keycode=XKeysymToKeycode(pDisplay,Keys[i].data); if (keycode==0){ - err = QCoreApplication::translate("AutoType","Auto-Type string contains illegal characters"); + err = QCoreApplication::translate("AutoType","Auto-Type string contains invalid characters"); break; } int mods=HelperX11::getModifiers(pDisplay,Keys[i].data,keycode); @@ -144,7 +144,7 @@ void AutoType::perform(IEntryHandle* entry, QString& err,bool hideWindow,int nr) AutoTypePrivate::sleepKeyStrokeDelay(); } else if (Keys[i].type==Delay){ - QCoreApplication::processEvents(); + QApplication::processEvents(); AutoTypePrivate::sleep(Keys[i].data); } } @@ -154,10 +154,8 @@ void AutoType::perform(IEntryHandle* entry, QString& err,bool hideWindow,int nr) XTestFakeKeyEvent(pDisplay,XKeysymToKeycode(pDisplay,XK_Caps_Lock),false,CurrentTime); } - if (hideWindow){ + if (hideWindow && !(config->showSysTrayIcon() && config->minimizeTray()) ) MainWin->showMinimized(); - XIconifyWindow(pDisplay, MainWin->winId(), MainWin->x11Info().screen()); // workaround for Gnome - } } #ifdef GLOBAL_AUTOTYPE