summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-05-17 18:00:03 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-05-17 18:00:03 (GMT)
commit91a1f7a1c408052b1d284d6b901819964e338fe5 (patch)
treedf7103f0ea0cb9d98f4b641d72c0f8b0ebdf2498 /src/gui/kernel
parent94a3356d5eb7b255d439efe2699bf3a9b025e8eb (diff)
parent509ef11ab4ba6165c16d9d311c4a1bf7cdfd2528 (diff)
downloadQt-91a1f7a1c408052b1d284d6b901819964e338fe5.zip
Qt-91a1f7a1c408052b1d284d6b901819964e338fe5.tar.gz
Qt-91a1f7a1c408052b1d284d6b901819964e338fe5.tar.bz2
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts: demos/demos.pro mkspecs/features/resources.prf mkspecs/features/uic.prf src/corelib/io/qurl.cpp src/corelib/tools/qlocale_symbian.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicswidget_p.cpp src/gui/graphicsview/qgraphicswidget_p.h src/gui/util/qsystemtrayicon_win.cpp src/multimedia/audio/qaudioinput.cpp tests/auto/qhostinfo/qhostinfo.pro
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp10
-rw-r--r--src/gui/kernel/qapplication_win.cpp2
-rw-r--r--src/gui/kernel/qwidget_s60.cpp4
3 files changed, 10 insertions, 6 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index f4c7304..3213f66 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -642,10 +642,12 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
QPoint pos = QCursor::pos();
TPointerEvent fakeEvent;
+ fakeEvent.iType = (TPointerEvent::TType)(-1);
TInt x = pos.x();
TInt y = pos.y();
if (type == EEventKeyUp) {
- if (keyCode == Qt::Key_Select)
+ if (keyCode == Qt::Key_Select &&
+ (S60->virtualMousePressedKeys & QS60Data::Select))
fakeEvent.iType = TPointerEvent::EButton1Up;
S60->virtualMouseAccel = 1;
S60->virtualMouseLastKey = 0;
@@ -694,8 +696,7 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
// example for drag'n'drop), Symbian starts producing spurious up and
// down messages for some keys. Therefore, make sure we have a clean slate
// of pressed keys before starting a new button press.
- if (S60->virtualMousePressedKeys != 0) {
- S60->virtualMousePressedKeys |= QS60Data::Select;
+ if (S60->virtualMousePressedKeys & QS60Data::Select) {
return EKeyWasConsumed;
} else {
S60->virtualMousePressedKeys |= QS60Data::Select;
@@ -718,7 +719,8 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
fakeEvent.iModifiers = keyEvent.iModifiers;
fakeEvent.iPosition = cpos;
fakeEvent.iParentPosition = epos;
- HandlePointerEvent(fakeEvent);
+ if(fakeEvent.iType != -1)
+ HandlePointerEvent(fakeEvent);
return EKeyWasConsumed;
}
else {
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 50b9759..60fc5e1 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -2477,7 +2477,7 @@ extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wPa
QApplication::postEvent(widget, new QEvent(QEvent::Close));
else
#ifndef QT_NO_MENUBAR
- QMenuBar::wceCommands(LOWORD(wParam), (HWND) lParam);
+ QMenuBar::wceCommands(LOWORD(wParam));
#endif
result = true;
}
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index a0429d3..02e7cb8 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -387,7 +387,6 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de
| EPointerFilterMove | EPointerFilterDrag, 0);
drawableWindow->EnableVisibilityChangeEvents();
- s60UpdateIsOpaque();
}
q->setAttribute(Qt::WA_WState_Created);
@@ -400,6 +399,9 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de
// this generates a WinIdChanged event.
setWinId(control.take());
+ if (!desktop)
+ s60UpdateIsOpaque(); // must be called after setWinId()
+
} else if (q->testAttribute(Qt::WA_NativeWindow) || paintOnScreen()) { // create native child widget
QScopedPointer<QSymbianControl> control( q_check_ptr(new QSymbianControl(q)) );