Cleanup: use break rather than nested if/else constructs.

This commit is contained in:
Albert Weichselbraun 2013-11-18 06:17:56 +01:00
parent 6b33298a6e
commit 3fcfc348ed

View File

@ -632,30 +632,32 @@ void AutoTypePlatformX11::SendKeyPressedEvent(KeySym keysym, unsigned int shift)
XkbTranslateKeyCode(kbd, keycode, 0, &mods_rtrn, &ks);
if (ks == keysym) {
shift &= ~m_altgrMask;
shift &= ~ShiftMask;
found = TRUE;
} else {
break;
}
XkbTranslateKeyCode(kbd, keycode, ShiftMask, &mods_rtrn, &ks);
if (ks == keysym) {
shift &= ~m_altgrMask;
shift |= ShiftMask;
found = TRUE;
} else {
break;
}
XkbTranslateKeyCode(kbd, keycode, Mod5Mask, &mods_rtrn, &ks);
if (ks == keysym) {
shift &= ~ShiftMask;
shift |= m_altgrMask;
found = TRUE;
} else {
break;
}
XkbTranslateKeyCode(kbd, keycode, Mod5Mask, &mods_rtrn, &ks);
if (ks == keysym) {
shift |= ShiftMask | m_altgrMask;
found = TRUE;
}
}
}
break;
}
if (found) break;