bugfix:can't show dock by mouse at first time in smart(keep)-hide mode

Change-Id: I49631c2addca57d51d3da88a3ac786123a209c61
This commit is contained in:
杨万青 2015-10-12 16:02:25 +08:00
parent 004c235852
commit 6d953151bd
Notes: Deepin Code Review 2016-06-14 07:19:47 +00:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: <yangwanqing@linuxdeepin.com>
Submitted-by: <yangwanqing@linuxdeepin.com>
Submitted-at: Mon, 12 Oct 2015 16:11:05 +0800
Reviewed-on: https://cr.deepin.io/7692
Project: dde/dde-dock
Branch: refs/heads/master
2 changed files with 8 additions and 1 deletions

View File

@ -87,6 +87,12 @@ void MainWidget::enterEvent(QEvent *)
}
}
void MainWidget::leaveEvent(QEvent *)
{
if (!this->geometry().contains(QCursor::pos()))
m_dhsm->UpdateState();
}
void MainWidget::showDock()
{
m_hasHidden = false;
@ -102,7 +108,7 @@ void MainWidget::hideDock()
void MainWidget::onPanelSizeChanged()
{
QRect rec = QApplication::desktop()->screenGeometry();
this->setFixedSize(m_mainPanel->size());
this->setFixedSize(m_mainPanel->width(), height());
this->move((rec.width() - width()) / 2, y());
}

View File

@ -29,6 +29,7 @@ public:
protected:
void enterEvent(QEvent *);
void leaveEvent(QEvent *);
private:
void showDock();