mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
fix: popupwindow need click destkop twice to hide
Log: only not hide it when focus widget is QLineEdit
This commit is contained in:
parent
69cec726c3
commit
24ff57eb70
@ -213,11 +213,6 @@ void DockPopupWindow::ensureRaised()
|
||||
|
||||
void DockPopupWindow::onButtonPress(int type, int x, int y, const QString &key)
|
||||
{
|
||||
// if there is something focus on widget, return
|
||||
if (auto focus = qApp->focusWidget()) {
|
||||
qDebug() << "PopupWindow not hide, focus className is" << focus->metaObject()->className();
|
||||
return;
|
||||
}
|
||||
if (!m_enableMouseRelease)
|
||||
return;
|
||||
QRect screenRect = this->screen()->geometry();
|
||||
@ -233,6 +228,16 @@ void DockPopupWindow::onButtonPress(int type, int x, int y, const QString &key)
|
||||
return;
|
||||
}
|
||||
|
||||
// if there is something focus on widget, return
|
||||
if (auto focus = qApp->focusWidget()) {
|
||||
auto className = QString(focus->metaObject()->className());
|
||||
qDebug() << "Find focused widget, focus className is" << className;
|
||||
if (className == "QLineEdit") {
|
||||
qDebug() << "PopupWindow window will not be hidden";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
emit accept();
|
||||
hide();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user