fixbug:#I7JFT2
This commit is contained in:
parent
82257a145f
commit
17a801769e
|
@ -1105,12 +1105,14 @@ void FullBackgroundWidget::onGlobalKeyRelease(int key)
|
||||||
// 键盘上的num_lock生效、不需要登录界面进行管理
|
// 键盘上的num_lock生效、不需要登录界面进行管理
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
if (QX11Info::isPlatformX11()) {
|
||||||
if (key == 65) { // "Space"
|
if (key == 65) { // "Space"
|
||||||
if (lockWidget && lockWidget->isVisible()) {/*keyReleaseEvent有时候监听不到Space的按键事件 原因未知
|
if (lockWidget && lockWidget->isVisible()) {/*keyReleaseEvent有时候监听不到Space的按键事件 原因未知
|
||||||
把Space按键放到nativeEventFilter里面*/
|
把Space按键放到nativeEventFilter里面*/
|
||||||
lockWidget->key_enter_release(Qt::Key_Space);
|
lockWidget->key_enter_release(Qt::Key_Space);
|
||||||
}
|
}
|
||||||
} else if (key == Qt::Key_Escape && screenStatus == SCREEN_LOCK) { // "escape"
|
}
|
||||||
|
if (key == 9 && screenStatus == SCREEN_LOCK) { // "escape"
|
||||||
bool canShow = true;
|
bool canShow = true;
|
||||||
if (lockWidget && !lockWidget->exitSubWidget())
|
if (lockWidget && !lockWidget->exitSubWidget())
|
||||||
canShow = false;
|
canShow = false;
|
||||||
|
@ -1123,6 +1125,21 @@ void FullBackgroundWidget::onGlobalKeyRelease(int key)
|
||||||
} else if (screenStatus & SCREEN_SAVER && !isBlank) {
|
} else if (screenStatus & SCREEN_SAVER && !isBlank) {
|
||||||
clearScreensavers();
|
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,6 +1604,7 @@ void LockWidget::initUserMenu()
|
||||||
|
|
||||||
void LockWidget::keyReleaseEvent(QKeyEvent *e)
|
void LockWidget::keyReleaseEvent(QKeyEvent *e)
|
||||||
{
|
{
|
||||||
|
if (!QX11Info::isPlatformX11())
|
||||||
Q_EMIT keyGlobalRelease(e->key());
|
Q_EMIT keyGlobalRelease(e->key());
|
||||||
|
|
||||||
/* if (e->key() == 9) { // "Escape"
|
/* if (e->key() == 9) { // "Escape"
|
||||||
|
|
Loading…
Reference in New Issue