diff options
author | Alessandro Portale <aportale@trolltech.com> | 2009-06-03 13:53:38 (GMT) |
---|---|---|
committer | Alessandro Portale <aportale@trolltech.com> | 2009-06-03 13:53:38 (GMT) |
commit | 4f6c82fe55c0ac0600c1894283541d010289480f (patch) | |
tree | 5b1434318f94b9e534474a4118eaefd9223388f9 /src/gui/kernel/qapplication_win.cpp | |
parent | b2d43b06d1c1debcd42afbc7dfd85c4991c670d5 (diff) | |
parent | a1983f1daf12b2d41082036b88d14236bf89d4d9 (diff) | |
download | Qt-4f6c82fe55c0ac0600c1894283541d010289480f.zip Qt-4f6c82fe55c0ac0600c1894283541d010289480f.tar.gz Qt-4f6c82fe55c0ac0600c1894283541d010289480f.tar.bz2 |
Resolving merge conflicts
Diffstat (limited to 'src/gui/kernel/qapplication_win.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_win.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index f14ad6f..239ee14 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -1675,20 +1675,23 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam // send the context menu event is a different one if (!alienWidget->testAttribute(Qt::WA_NativeWindow) && !alienWidget->testAttribute(Qt::WA_PaintOnScreen)) { alienWidget = QApplication::widgetAt(globalPos); - pos = alienWidget->mapFromGlobal(globalPos); + if (alienWidget) + pos = alienWidget->mapFromGlobal(globalPos); } - SHRGINFO shrg; - shrg.cbSize = sizeof(shrg); - shrg.hwndClient = hwnd; - shrg.ptDown.x = GET_X_LPARAM(lParam); - shrg.ptDown.y = GET_Y_LPARAM(lParam); - shrg.dwFlags = SHRG_RETURNCMD | SHRG_NOANIMATION; - resolveAygLibs(); - if (ptrRecognizeGesture && (ptrRecognizeGesture(&shrg) == GN_CONTEXTMENU)) { - if (qApp->activePopupWidget()) - qApp->activePopupWidget()->close(); - QContextMenuEvent e(QContextMenuEvent::Mouse, pos, globalPos); - result = qt_sendSpontaneousEvent(alienWidget, &e); + if (alienWidget) { + SHRGINFO shrg; + shrg.cbSize = sizeof(shrg); + shrg.hwndClient = hwnd; + shrg.ptDown.x = GET_X_LPARAM(lParam); + shrg.ptDown.y = GET_Y_LPARAM(lParam); + shrg.dwFlags = SHRG_RETURNCMD | SHRG_NOANIMATION; + resolveAygLibs(); + if (ptrRecognizeGesture && (ptrRecognizeGesture(&shrg) == GN_CONTEXTMENU)) { + if (qApp->activePopupWidget()) + qApp->activePopupWidget()->close(); + QContextMenuEvent e(QContextMenuEvent::Mouse, pos, globalPos); + result = qt_sendSpontaneousEvent(alienWidget, &e); + } } } } |