summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-07-27 12:34:09 +0300
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-07-27 12:34:09 +0300
commit122d2550fe44ac6f1ae7099bb2eef2489c63a92b (patch)
treed73c29b713e9c77132475cd62e090812592f13c6
parent76b9f821d517dbd4a784a5b35de30b8d35c316c0 (diff)
parent509dbb646b9d2906084ecfadfcb997341506767d (diff)
Merge branch 'master' into refactor
Conflicts: examples/qml-compositor/qml-compositor.pro
-rw-r--r--examples/qwidget-compositor-mdi/qt-compositor.pro4
-rw-r--r--examples/qwidget-compositor/qt-compositor.pro5
-rw-r--r--src/qt-compositor/compositor_api/compositor_api.pri5
-rw-r--r--src/qt-compositor/compositor_api/waylandsurfaceitem.cpp3
-rw-r--r--src/qt-compositor/hardware_integration/hardware_integration.pri2
-rw-r--r--src/qt-compositor/wayland_wrapper/wlsurface.cpp38
6 files changed, 26 insertions, 31 deletions
diff --git a/examples/qwidget-compositor-mdi/qt-compositor.pro b/examples/qwidget-compositor-mdi/qt-compositor.pro
index f6f8907..3cd110b 100644
--- a/examples/qwidget-compositor-mdi/qt-compositor.pro
+++ b/examples/qwidget-compositor-mdi/qt-compositor.pro
@@ -6,10 +6,6 @@ INCLUDEPATH += .
# comment out the following to not use pkg-config in the pri files
CONFIG += use_pkgconfig
-!isEmpty(QT.core.MAJOR_VERSION):greaterThan(QT.core.MAJOR_VERSION, 4) {
-QT += core-private gui-private
-}
-
DESTDIR=$$PWD/../../bin/
include (../../src/qt-compositor/qt-compositor.pri)
diff --git a/examples/qwidget-compositor/qt-compositor.pro b/examples/qwidget-compositor/qt-compositor.pro
index 69c3c42..353b34c 100644
--- a/examples/qwidget-compositor/qt-compositor.pro
+++ b/examples/qwidget-compositor/qt-compositor.pro
@@ -6,10 +6,6 @@ INCLUDEPATH += .
# comment out the following to not use pkg-config in the pri files
CONFIG += use_pkgconfig
-!isEmpty(QT.core.MAJOR_VERSION):greaterThan(QT.core.MAJOR_VERSION, 4) {
-QT += core-private gui-private
-}
-
DESTDIR=$$PWD/../../bin/
include (../../src/qt-compositor/qt-compositor.pri)
@@ -32,3 +28,4 @@ SOURCES += $$TOUCHSCREEN_BASE/qtouchscreen.cpp
HEADERS += $$TOUCHSCREEN_BASE/qtouchscreen.h
INCLUDEPATH += $$TOUCHSCREEN_BASE
LIBS += -ludev -lmtdev
+QT += gui-private
diff --git a/src/qt-compositor/compositor_api/compositor_api.pri b/src/qt-compositor/compositor_api/compositor_api.pri
index e605c8c..dfae71b 100644
--- a/src/qt-compositor/compositor_api/compositor_api.pri
+++ b/src/qt-compositor/compositor_api/compositor_api.pri
@@ -14,3 +14,8 @@ contains(QT, declarative) {
DEFINES += QT_COMPOSITOR_DECLARATIVE
}
+
+!isEmpty(QT.core.MAJOR_VERSION):greaterThan(QT.core.MAJOR_VERSION, 4) {
+ QT += core-private
+ contains(QT, declarative):QT += declarative-private opengl-private gui-private
+}
diff --git a/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp b/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp
index f2fc5cd..e503a03 100644
--- a/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp
+++ b/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp
@@ -42,7 +42,6 @@
#include "waylandsurface.h"
#include <QtDeclarative/QSGEngine>
-//#include <private/qsgitem_p.h>
#include <QtGui/QKeyEvent>
@@ -162,7 +161,7 @@ void WaylandSurfaceItem::keyReleaseEvent(QKeyEvent *event)
void WaylandSurfaceItem::touchEvent(QTouchEvent *event)
{
- if (m_touchEventsEnabled && m_surface && hasFocus()) {
+ if (m_touchEventsEnabled && m_surface) {
event->accept();
QList<QTouchEvent::TouchPoint> points = event->touchPoints();
if (!points.isEmpty()) {
diff --git a/src/qt-compositor/hardware_integration/hardware_integration.pri b/src/qt-compositor/hardware_integration/hardware_integration.pri
index 803a4cb..f7fdc05 100644
--- a/src/qt-compositor/hardware_integration/hardware_integration.pri
+++ b/src/qt-compositor/hardware_integration/hardware_integration.pri
@@ -1,4 +1,4 @@
-QT_WAYLAND_GL_CONFIG = $$(QT_WAYLAND_GL_CONFIG)
+isEmpty(QT_WAYLAND_GL_CONFIG):QT_WAYLAND_GL_CONFIG = $$(QT_WAYLAND_GL_CONFIG)
!mac:contains(QT_CONFIG, opengl):!isEqual(QT_WAYLAND_GL_CONFIG,nogl) {
HEADERS += \
diff --git a/src/qt-compositor/wayland_wrapper/wlsurface.cpp b/src/qt-compositor/wayland_wrapper/wlsurface.cpp
index 4807e62..e9c4a24 100644
--- a/src/qt-compositor/wayland_wrapper/wlsurface.cpp
+++ b/src/qt-compositor/wayland_wrapper/wlsurface.cpp
@@ -359,26 +359,24 @@ void Surface::sendKeyReleaseEvent(uint code)
void Surface::sendTouchPointEvent(int id, int x, int y, Qt::TouchPointState state)
{
Q_D(Surface);
- if (d->compositor->defaultInputDevice()->keyboard_focus) {
- uint32_t time = d->compositor->currentTimeMsecs();
- struct wl_client *client = d->client;
- struct wl_object *dev = &d->compositor->defaultInputDevice()->object;
- switch (state) {
- case Qt::TouchPointPressed:
- wl_client_post_event(client, dev, WL_INPUT_DEVICE_TOUCH_DOWN, time, id, x, y);
- break;
- case Qt::TouchPointMoved:
- wl_client_post_event(client, dev, WL_INPUT_DEVICE_TOUCH_MOTION, time, id, x, y);
- break;
- case Qt::TouchPointReleased:
- wl_client_post_event(client, dev, WL_INPUT_DEVICE_TOUCH_UP, time, id);
- break;
- case Qt::TouchPointStationary:
- // stationary points are not sent through wayland, the client must cache them
- break;
- default:
- break;
- }
+ uint32_t time = d->compositor->currentTimeMsecs();
+ struct wl_client *client = d->client;
+ struct wl_object *dev = &d->compositor->defaultInputDevice()->object;
+ switch (state) {
+ case Qt::TouchPointPressed:
+ wl_client_post_event(client, dev, WL_INPUT_DEVICE_TOUCH_DOWN, time, id, x, y);
+ break;
+ case Qt::TouchPointMoved:
+ wl_client_post_event(client, dev, WL_INPUT_DEVICE_TOUCH_MOTION, time, id, x, y);
+ break;
+ case Qt::TouchPointReleased:
+ wl_client_post_event(client, dev, WL_INPUT_DEVICE_TOUCH_UP, time, id);
+ break;
+ case Qt::TouchPointStationary:
+ // stationary points are not sent through wayland, the client must cache them
+ break;
+ default:
+ break;
}
}