Merge "auto focus popup window"

This commit is contained in:
石博文 2016-09-01 03:05:23 +00:00 committed by Deepin Code Review
commit 4bfaa78d66
2 changed files with 9 additions and 0 deletions

View File

@ -61,6 +61,14 @@ void DockPopupWindow::hide()
DArrowRectangle::hide();
}
void DockPopupWindow::enterEvent(QEvent *e)
{
DArrowRectangle::enterEvent(e);
raise();
setFocus(Qt::ActiveWindowFocusReason);
}
void DockPopupWindow::mousePressEvent(QMouseEvent *e)
{
DArrowRectangle::mousePressEvent(e);

View File

@ -25,6 +25,7 @@ signals:
void accept() const;
protected:
void enterEvent(QEvent *e);
void mousePressEvent(QMouseEvent *e);
bool eventFilter(QObject *o, QEvent *e);