summaryrefslogtreecommitdiffstats
path: root/src/compositor/wayland_wrapper
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@theqtcompany.com>2015-08-11 16:20:56 +0200
committerJørgen Lind <jorgen.lind@theqtcompany.com>2015-08-28 13:10:33 +0200
commit1b9e6e56269a5768cb8a83dc5e4b888fd63dd13c (patch)
treed0814f9f2d46ea32782ef668930694aa50da223f /src/compositor/wayland_wrapper
parente01b81339a37830c48f2cec0583e5d0aba592601 (diff)
Move some virtual functions into protected scoping.
Users should not call these functions, but they should be able to sub-class QWaylandCompositor to reimplement them Change-Id: I35888fec67bec085820733135f201bab1df268a3
Diffstat (limited to 'src/compositor/wayland_wrapper')
-rw-r--r--src/compositor/wayland_wrapper/qwlcompositor_p.h7
-rw-r--r--src/compositor/wayland_wrapper/qwlinputdevice.cpp6
2 files changed, 10 insertions, 3 deletions
diff --git a/src/compositor/wayland_wrapper/qwlcompositor_p.h b/src/compositor/wayland_wrapper/qwlcompositor_p.h
index fb71ea57c..4881addae 100644
--- a/src/compositor/wayland_wrapper/qwlcompositor_p.h
+++ b/src/compositor/wayland_wrapper/qwlcompositor_p.h
@@ -141,6 +141,13 @@ public:
void unregisterSurface(QWaylandSurface *surface);
+ QWaylandPointer *callCreatePointerDevice(QWaylandInputDevice *inputDevice)
+ { return m_qt_compositor->createPointerDevice(inputDevice); }
+ QWaylandKeyboard *callCreateKeyboardDevice(QWaylandInputDevice *inputDevice)
+ { return m_qt_compositor->createKeyboardDevice(inputDevice); }
+ QWaylandTouch *callCreateTouchDevice(QWaylandInputDevice *inputDevice)
+ { return m_qt_compositor->createTouchDevice(inputDevice); }
+
public Q_SLOTS:
void cleanupGraphicsResources();
diff --git a/src/compositor/wayland_wrapper/qwlinputdevice.cpp b/src/compositor/wayland_wrapper/qwlinputdevice.cpp
index 858495ac1..2849a2373 100644
--- a/src/compositor/wayland_wrapper/qwlinputdevice.cpp
+++ b/src/compositor/wayland_wrapper/qwlinputdevice.cpp
@@ -109,15 +109,15 @@ void QWaylandInputDevicePrivate::setCapabilities(QWaylandInputDevice::Capability
QWaylandInputDevice::CapabilityFlags changed = caps ^ m_capabilities;
if (changed & QWaylandInputDevice::Pointer) {
- m_pointer.reset(m_pointer.isNull() ? compositor()->createPointerDevice(q) : 0);
+ m_pointer.reset(m_pointer.isNull() ? compositor()->handle()->callCreatePointerDevice(q) : 0);
}
if (changed & QWaylandInputDevice::Keyboard) {
- m_keyboard.reset(m_keyboard.isNull() ? compositor()->createKeyboardDevice(q) : 0);
+ m_keyboard.reset(m_keyboard.isNull() ? compositor()->handle()->callCreateKeyboardDevice(q) : 0);
}
if (changed & QWaylandInputDevice::Touch) {
- m_touch.reset(m_touch.isNull() ? compositor()->createTouchDevice(q) : 0);
+ m_touch.reset(m_touch.isNull() ? compositor()->handle()->callCreateTouchDevice(q) : 0);
}
m_capabilities = caps;