mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 16:30:02 +00:00
fix: when there is focus on dockpopupwindow, it hide
Log: fix when there is focus and dockpopupwindow hide
This commit is contained in:
parent
1bb0c628f3
commit
c2ba4e4971
@ -213,6 +213,11 @@ void DockPopupWindow::ensureRaised()
|
|||||||
|
|
||||||
void DockPopupWindow::onButtonPress(int type, int x, int y, const QString &key)
|
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)
|
if (!m_enableMouseRelease)
|
||||||
return;
|
return;
|
||||||
QRect screenRect = this->screen()->geometry();
|
QRect screenRect = this->screen()->geometry();
|
||||||
|
@ -52,10 +52,10 @@ signals:
|
|||||||
void unusedSignal();
|
void unusedSignal();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void showEvent(QShowEvent *e);
|
void showEvent(QShowEvent *e) override;
|
||||||
void hideEvent(QHideEvent *event);
|
void hideEvent(QHideEvent *event) override;
|
||||||
void enterEvent(QEvent *e);
|
void enterEvent(QEvent *e) override;
|
||||||
bool eventFilter(QObject *o, QEvent *e);
|
bool eventFilter(QObject *o, QEvent *e) override;
|
||||||
void blockButtonRelease();
|
void blockButtonRelease();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user