From fdf92294798bea26e284c621976de7779cc94f5c Mon Sep 17 00:00:00 2001 From: liudun Date: Thu, 24 Aug 2023 17:36:59 +0800 Subject: [PATCH] fix(virtualkeyboardwidget): Set the screen to lock or hibernate when the cover is closed, and the keyboard screen appears when the cover is opened MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: Set the screen to lock or hibernate when the cover is closed, and the keyboard screen appears when the cover is opened Log: 置合盖时锁屏或休眠,开盖时出现键盘界面 Bug: bug#I72HS3【次要】【电源管理】设置合盖时锁屏或休眠,开盖时出现键盘界面 --- src/lockwidget.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lockwidget.cpp b/src/lockwidget.cpp index 3d0d60a..9949706 100644 --- a/src/lockwidget.cpp +++ b/src/lockwidget.cpp @@ -625,9 +625,9 @@ void LockWidget::startAuth() if(authDialog) { authDialog->startAuth(); - if (isTableMode && !(vKeyboard && vKeyboard->isVisible())) { - showVirtualKeyboard(); - } +// if (isTableMode && !(vKeyboard && vKeyboard->isVisible())) { +// showVirtualKeyboard(); +// } } } @@ -803,9 +803,9 @@ void LockWidget::initUI() //监听物理键盘插拔 libswitch = new LibinputSwitchEvent; isTableMode = libswitch->geInitDevicesStatus(); - if(isTableMode && !(vKeyboard && vKeyboard->isVisible())) { - showVirtualKeyboard(); - } +// if(isTableMode && !(vKeyboard && vKeyboard->isVisible())) { +// showVirtualKeyboard(); +// } connect(libswitch , &LibinputSwitchEvent::tabletModeStatusChanged, this, [ = ](int tablet_mode) { isTableMode = tablet_mode; qInfo()<<"TableMode:"<getLineeditStatus()) { tabAt = LINEEDIT; authDialog->setFocusin(IN_LINEEDIT); - if (m_isShowKeyboard && isTableMode && !(vKeyboard && vKeyboard->isVisible())) { - showVirtualKeyboard(); - } +// if (m_isShowKeyboard && isTableMode && !(vKeyboard && vKeyboard->isVisible())) { +// showVirtualKeyboard(); +// } } else { tabAt = MESSAGEBTN; authDialog->setFocusin(ON_MESSAGEBTN);