Another ctrl+alt+del checkpoint.
This commit is contained in:
parent
784ab183ae
commit
5ca0e026ab
|
@ -242,7 +242,7 @@ CXWindowsPrimaryScreen::onEvent(CEvent* event)
|
|||
KeyID key = mapKey(&xevent.xkey);
|
||||
if (key != kKeyNone) {
|
||||
// check for ctrl+alt+del emulation
|
||||
if ((key == kKeyPause || key == kKeyCancel) &&
|
||||
if ((key == kKeyPause || key == kKeyBreak) &&
|
||||
(mask & (KeyModifierControl | KeyModifierAlt)) ==
|
||||
(KeyModifierControl | KeyModifierAlt)) {
|
||||
// pretend it's ctrl+alt+del
|
||||
|
@ -291,7 +291,7 @@ CXWindowsPrimaryScreen::onEvent(CEvent* event)
|
|||
}
|
||||
|
||||
// check for ctrl+alt+del emulation
|
||||
if ((key == kKeyPause || key == kKeyCancel) &&
|
||||
if ((key == kKeyPause || key == kKeyBreak) &&
|
||||
(mask & (KeyModifierControl | KeyModifierAlt)) ==
|
||||
(KeyModifierControl | KeyModifierAlt)) {
|
||||
// pretend it's ctrl+alt+del and ignore autorepeat
|
||||
|
|
|
@ -118,14 +118,11 @@ CXWindowsSecondaryScreen::keyDown(KeyID key,
|
|||
KeyCode keycode;
|
||||
|
||||
// check for ctrl+alt+del emulation
|
||||
if ((mask & (KeyModifierControl | KeyModifierAlt)) ==
|
||||
(KeyModifierControl | KeyModifierAlt) &&
|
||||
key == XK_Up - 0xff00 + 0xef00) {
|
||||
// just convert the key to Delete and synthesize the key
|
||||
// normally. the X server/window manager will do the right
|
||||
// thing (or, at least XFree86/KDE will).
|
||||
if (key == kKeyDelete &&
|
||||
(mask & (KeyModifierControl | KeyModifierAlt)) ==
|
||||
(KeyModifierControl | KeyModifierAlt)) {
|
||||
LOG((CLOG_DEBUG "ctrl+alt+del emulation"));
|
||||
key = XK_Delete - 0xff00u + 0xef00u;
|
||||
// just pass the key through
|
||||
}
|
||||
|
||||
// get the sequence of keys to simulate key press and the final
|
||||
|
@ -214,6 +211,14 @@ CXWindowsSecondaryScreen::keyUp(KeyID key,
|
|||
return;
|
||||
}
|
||||
|
||||
// check for ctrl+alt+del emulation
|
||||
if (key == kKeyDelete &&
|
||||
(mask & (KeyModifierControl | KeyModifierAlt)) ==
|
||||
(KeyModifierControl | KeyModifierAlt)) {
|
||||
LOG((CLOG_DEBUG "ctrl+alt+del emulation"));
|
||||
// just pass the key through
|
||||
}
|
||||
|
||||
// get the sequence of keys to simulate key release and the final
|
||||
// modifier state.
|
||||
m_mask = mapKey(keys, keycode, key, mask, kRelease);
|
||||
|
|
Loading…
Reference in New Issue