From dd2777a7425b0028f580112bdbcc49e39c4b97f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E5=8D=9A=E6=96=87?= Date: Tue, 30 Aug 2016 16:34:02 +0800 Subject: [PATCH] show present window on clicked Change-Id: I5792c1ae358f06e42f9af63fea55c23363c1aa1b --- frame/dbus/dbusdockentry.h | 5 +++++ frame/item/appitem.cpp | 7 +++++++ frame/item/appitem.h | 1 + 3 files changed, 13 insertions(+) diff --git a/frame/dbus/dbusdockentry.h b/frame/dbus/dbusdockentry.h index 56b244db2..029d514eb 100644 --- a/frame/dbus/dbusdockentry.h +++ b/frame/dbus/dbusdockentry.h @@ -117,6 +117,11 @@ public Q_SLOTS: // METHODS return asyncCall(QStringLiteral("RequestUndock")); } + inline QDBusPendingReply<> PresentWindows() + { + return asyncCall(QStringLiteral("PresentWindows")); + } + Q_SIGNALS: // SIGNALS // begin property changed signals void ActiveChanged(); diff --git a/frame/item/appitem.cpp b/frame/item/appitem.cpp index 3bd96aaea..5eec8c891 100644 --- a/frame/item/appitem.cpp +++ b/frame/item/appitem.cpp @@ -253,6 +253,13 @@ void AppItem::mouseMoveEvent(QMouseEvent *e) startDrag(); } +void AppItem::wheelEvent(QWheelEvent *e) +{ + QWidget::wheelEvent(e); + + m_itemEntry->PresentWindows(); +} + void AppItem::resizeEvent(QResizeEvent *e) { DockItem::resizeEvent(e); diff --git a/frame/item/appitem.h b/frame/item/appitem.h index c5061a25c..aa8921c5d 100644 --- a/frame/item/appitem.h +++ b/frame/item/appitem.h @@ -29,6 +29,7 @@ private: void mouseReleaseEvent(QMouseEvent *e); void mousePressEvent(QMouseEvent *e); void mouseMoveEvent(QMouseEvent *e); + void wheelEvent(QWheelEvent *e); void resizeEvent(QResizeEvent *e); void dragEnterEvent(QDragEnterEvent *e); void dropEvent(QDropEvent *e);