Changeset 277
- Timestamp:
- Nov 2, 2009, 3:00:35 PM (16 years ago)
- Location:
- trunk/src/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/util/qsystemtrayicon_pm.cpp
r260 r277 46 46 #ifndef QT_NO_SYSTEMTRAYICON 47 47 48 49 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; -
trunk/src/gui/widgets/qmenu.cpp
r2 r277 165 165 } 166 166 167 // Windowsand KDE allows menus to cover the taskbar, while GNOME and Mac don't167 // and KDE allows menus to cover the taskbar, while GNOME and Mac don't 168 168 QRect QMenuPrivate::popupGeometry(int screen) const 169 169 { 170 #if def Q_WS_WIN170 #if 171 171 return QApplication::desktop()->screenGeometry(screen); 172 172 #elif defined Q_WS_X11 … … 1096 1096 QList< QPointer<QWidget> > list; 1097 1097 for(QWidget *widget = q->parentWidget(); widget; ) { 1098 if (qobject_cast<QMenu*>(widget) 1098 if (qobject_cast<QMenu*>(widget) 1099 1099 #ifndef QT_NO_MENUBAR 1100 1100 || qobject_cast<QMenuBar*>(widget) … … 1262 1262 is represented vertically and rendered by QStyle. In addition, actions 1263 1263 can have a text label, an optional icon drawn on the very left side, 1264 and shortcut key sequence such as "Ctrl+X". 1264 and shortcut key sequence such as "Ctrl+X". 1265 1265 1266 1266 The existing actions held by a menu can be found with actions().
Note:
See TracChangeset
for help on using the changeset viewer.