auto focus popup window

Change-Id: I7a91ebff857806943fd2a77d3ddf88252187f42a
This commit is contained in:
石博文 2016-09-01 10:55:19 +08:00
parent 70d3233400
commit 2f4dfabe8b
Notes: Deepin Code Review 2016-09-01 03:05:23 +00:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Thu, 01 Sep 2016 03:05:23 +0000
Reviewed-on: https://cr.deepin.io/15761
Project: dde/dde-dock
Branch: refs/heads/master
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);