commit
004330d699
|
@ -1105,23 +1105,40 @@ void FullBackgroundWidget::onGlobalKeyRelease(int key)
|
||||||
// 键盘上的num_lock生效、不需要登录界面进行管理
|
// 键盘上的num_lock生效、不需要登录界面进行管理
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (key == 65) { // "Space"
|
if (QX11Info::isPlatformX11()) {
|
||||||
if (lockWidget && lockWidget->isVisible()) {/*keyReleaseEvent有时候监听不到Space的按键事件 原因未知
|
if (key == 65) { // "Space"
|
||||||
把Space按键放到nativeEventFilter里面*/
|
if (lockWidget && lockWidget->isVisible()) {/*keyReleaseEvent有时候监听不到Space的按键事件 原因未知
|
||||||
lockWidget->key_enter_release(Qt::Key_Space);
|
把Space按键放到nativeEventFilter里面*/
|
||||||
|
lockWidget->key_enter_release(Qt::Key_Space);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (key == 9 && screenStatus == SCREEN_LOCK) { // "escape"
|
||||||
|
bool canShow = true;
|
||||||
|
if (lockWidget && !lockWidget->exitSubWidget())
|
||||||
|
canShow = false;
|
||||||
|
if (configuration && configuration->idledelay() == -1)
|
||||||
|
canShow = false;
|
||||||
|
if (!m_isAlreadyShowSaver)
|
||||||
|
canShow = false;
|
||||||
|
if (canShow)
|
||||||
|
showScreensaver();
|
||||||
|
} else if (screenStatus & SCREEN_SAVER && !isBlank) {
|
||||||
|
clearScreensavers();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (key == Qt::Key_Escape && screenStatus == SCREEN_LOCK) { // "escape"
|
||||||
|
bool canShow = true;
|
||||||
|
if (lockWidget && !lockWidget->exitSubWidget())
|
||||||
|
canShow = false;
|
||||||
|
if (configuration && configuration->idledelay() == -1)
|
||||||
|
canShow = false;
|
||||||
|
if (!m_isAlreadyShowSaver)
|
||||||
|
canShow = false;
|
||||||
|
if (canShow)
|
||||||
|
showScreensaver();
|
||||||
|
} else if (screenStatus & SCREEN_SAVER && !isBlank) {
|
||||||
|
clearScreensavers();
|
||||||
}
|
}
|
||||||
} else if (key == Qt::Key_Escape && screenStatus == SCREEN_LOCK) { // "escape"
|
|
||||||
bool canShow = true;
|
|
||||||
if (lockWidget && !lockWidget->exitSubWidget())
|
|
||||||
canShow = false;
|
|
||||||
if (configuration && configuration->idledelay() == -1)
|
|
||||||
canShow = false;
|
|
||||||
if (!m_isAlreadyShowSaver)
|
|
||||||
canShow = false;
|
|
||||||
if (canShow)
|
|
||||||
showScreensaver();
|
|
||||||
} else if (screenStatus & SCREEN_SAVER && !isBlank) {
|
|
||||||
clearScreensavers();
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -1604,7 +1604,8 @@ void LockWidget::initUserMenu()
|
||||||
|
|
||||||
void LockWidget::keyReleaseEvent(QKeyEvent *e)
|
void LockWidget::keyReleaseEvent(QKeyEvent *e)
|
||||||
{
|
{
|
||||||
Q_EMIT keyGlobalRelease(e->key());
|
if (!QX11Info::isPlatformX11())
|
||||||
|
Q_EMIT keyGlobalRelease(e->key());
|
||||||
|
|
||||||
/* if (e->key() == 9) { // "Escape"
|
/* if (e->key() == 9) { // "Escape"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue