fix popup window size adjust not real-time

Change-Id: I73f2e0b85f414df8e4b9982f5dfa6c62d26fd3b4
This commit is contained in:
石博文 2018-03-13 17:29:46 +08:00
parent e4faf0b5fc
commit aa04a45128
Notes: gerrit 2018-03-13 11:09:09 +00:00
Verified+1: Anonymous Coward #1000004
Verified+1: <yefei@linuxdeepin.com>
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Tue, 13 Mar 2018 11:09:09 +0000
Reviewed-on: https://cr.deepin.io/32552
Project: dde/dde-dock
Branch: refs/heads/master
2 changed files with 4 additions and 3 deletions

View File

@ -122,7 +122,8 @@ bool DockPopupWindow::eventFilter(QObject *o, QEvent *e)
return false;
// FIXME: ensure position move after global mouse release event
QTimer::singleShot(100, this, [this] { if (isVisible()) show(m_lastPoint, m_model); });
if (isVisible())
QTimer::singleShot(0, this, [=] { show(m_lastPoint, m_model); });
return false;
}

View File

@ -37,8 +37,8 @@ public:
const QString pluginDisplayName() const override;
void init(PluginProxyInterface *proxyInter) override;
QWidget *itemWidget(const QString &itemKey);
QWidget *itemTipsWidget(const QString &itemKey);
QWidget *itemWidget(const QString &itemKey) override;
QWidget *itemTipsWidget(const QString &itemKey) override;
private:
DBusAdaptors *m_dbusAdaptors;