Changeset 277 for trunk/src/gui/util/qsystemtrayicon_pm.cpp
- Timestamp:
- Nov 2, 2009, 3:00:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/util/qsystemtrayicon_pm.cpp
r260 r277 46 46 #ifndef QT_NO_SYSTEMTRAYICON 47 47 48 #include "qapplication.h" 49 #include "qdesktopwidget.h" 48 50 #include "qt_os2.h" 49 51 … … 133 135 switch(msg->msg) { 134 136 135 case WM_XST_MYNOTIFY: 136 { 137 // @todo 137 case WM_XST_MYNOTIFY: { 138 switch (SHORT2FROMMP(msg->mp1)) { 139 case XST_IN_MOUSE: { 140 PXSTMOUSEMSG pMsg = (PXSTMOUSEMSG)msg->mp2; 141 switch (pMsg->ulMouseMsg) { 142 case WM_BUTTON1CLICK: 143 emit q->activated(QSystemTrayIcon::Trigger); 144 break; 145 case WM_BUTTON1DBLCLK: 146 emit q->activated(QSystemTrayIcon::DoubleClick); 147 break; 148 case WM_BUTTON3CLICK: 149 emit q->activated(QSystemTrayIcon::MiddleClick); 150 break; 151 default: 152 break; 153 } 154 break; 155 } 156 case XST_IN_CONTEXT: { 157 PXSTCONTEXTMSG pMsg = (PXSTCONTEXTMSG)msg->mp2; 158 if (q->contextMenu()) { 159 QPoint gpos(pMsg->ptsPointerPos.x, 160 // flip y coordinate 161 QApplication::desktop()->height() - 162 (pMsg->ptsPointerPos.y + 1)); 163 q->contextMenu()->popup(gpos); 164 q->contextMenu()->activateWindow(); 165 // Must be activated for proper keyboardfocus and 166 // menu closing on OS/2 167 } 168 emit q->activated(QSystemTrayIcon::Context); 169 break; 170 } 171 default: 172 break; 173 } 138 174 break; 139 175 } 140 176 141 default: 142 { 143 if (msg->msg == WM_XST_CREATED) 144 { 177 default: { 178 if (msg->msg == WM_XST_CREATED) { 145 179 addToTray(); 146 180 return true;
Note:
See TracChangeset
for help on using the changeset viewer.