Merge 0.4 branch to trunk
git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@319 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -45,9 +45,16 @@ AutoTypeX11::AutoTypeX11(KeepassMainWindow* mainWin) {
|
||||
altgr_mask = 0;
|
||||
altgr_keysym = NoSymbol;
|
||||
|
||||
updateKeymap();
|
||||
reReadKeymap = false;
|
||||
}
|
||||
|
||||
void AutoTypeX11::updateKeymap() {
|
||||
ReadKeymap();
|
||||
if (!altgr_mask)
|
||||
AddModifier(XK_Mode_switch);
|
||||
if (!meta_mask)
|
||||
meta_mask = Mod4Mask;
|
||||
}
|
||||
|
||||
void AutoTypeX11::perform(IEntryHandle* entry, bool hideWindow, int nr, bool wasLocked){
|
||||
@@ -109,6 +116,14 @@ void AutoTypeX11::perform(IEntryHandle* entry, bool hideWindow, int nr, bool was
|
||||
}
|
||||
}
|
||||
|
||||
/* Re-read keymap before first auto-type,
|
||||
seems to be necessary on X.Org Server 1.6,
|
||||
when KeePassX is in autostart */
|
||||
if (!reReadKeymap) {
|
||||
updateKeymap();
|
||||
reReadKeymap = true;
|
||||
}
|
||||
|
||||
if (hideWindow)
|
||||
mainWin->hide();
|
||||
|
||||
@@ -138,8 +153,6 @@ void AutoTypeX11::perform(IEntryHandle* entry, bool hideWindow, int nr, bool was
|
||||
else{
|
||||
if (hideWindow && !(config->showSysTrayIcon() && config->minimizeTray()) )
|
||||
mainWin->showMinimized();
|
||||
if (wasLocked)
|
||||
mainWin->OnUnLockWorkspace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -557,7 +570,7 @@ void AutoTypeX11::ReadKeymap()
|
||||
XDisplayKeycodes(dpy, &min_keycode, &max_keycode);
|
||||
if (keysym_table != NULL) XFree(keysym_table);
|
||||
keysym_table = XGetKeyboardMapping(dpy,
|
||||
min_keycode, max_keycode - min_keycode + 1,
|
||||
min_keycode, max_keycode - min_keycode + 1,
|
||||
&keysym_per_keycode);
|
||||
for (keycode = min_keycode; keycode <= max_keycode; keycode++) {
|
||||
/* if the first keysym is alphabet and the second keysym is NoSymbol,
|
||||
|
||||
Reference in New Issue
Block a user