diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-07-28 10:58:46 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-07-28 11:45:59 (GMT) |
commit | 7eba68adc4a7862d9474179592e5c8393a7acdbb (patch) | |
tree | 73014cabc8b10f46203844aeb40de574d97032dc /src/gui/util | |
parent | a20f8dcbeafa34b50ef69d1c5db0f17b09731d2a (diff) | |
parent | 3bf3981c7026de9017887d08312391b54fe8afc6 (diff) | |
download | Qt-7eba68adc4a7862d9474179592e5c8393a7acdbb.zip Qt-7eba68adc4a7862d9474179592e5c8393a7acdbb.tar.gz Qt-7eba68adc4a7862d9474179592e5c8393a7acdbb.tar.bz2 |
Merge commit 'qt/master-stable'
Conflicts:
configure.exe
src/corelib/io/io.pri
src/corelib/io/qfilesystemwatcher.cpp
tests/auto/qfileinfo/tst_qfileinfo.cpp
tools/configure/configureapp.cpp
Diffstat (limited to 'src/gui/util')
-rw-r--r-- | src/gui/util/qsystemtrayicon_win.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/util/qsystemtrayicon_win.cpp b/src/gui/util/qsystemtrayicon_win.cpp index 85eae26..a0648a1 100644 --- a/src/gui/util/qsystemtrayicon_win.cpp +++ b/src/gui/util/qsystemtrayicon_win.cpp @@ -106,6 +106,7 @@ public: private: uint notifyIconSize; int maxTipLength; + bool ignoreNextMouseRelease; }; bool QSystemTrayIconSys::allowsMessages() @@ -128,7 +129,8 @@ bool QSystemTrayIconSys::supportsMessages() } QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *object) - : hIcon(0), q(object) + : hIcon(0), q(object), ignoreNextMouseRelease(false) + { #ifndef Q_OS_WINCE notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, guidItem); // NOTIFYICONDATAW_V2_SIZE; @@ -311,10 +313,15 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result ) switch (m->lParam) { case WM_LBUTTONUP: - emit q->activated(QSystemTrayIcon::Trigger); + if (ignoreNextMouseRelease) + ignoreNextMouseRelease = false; + else + emit q->activated(QSystemTrayIcon::Trigger); break; case WM_LBUTTONDBLCLK: + ignoreNextMouseRelease = true; // Since DBLCLICK Generates a second mouse + // release we must ignore it emit q->activated(QSystemTrayIcon::DoubleClick); break; |