m_compositor->enableSubSurfaceExtension();
}
-void WaylandCompositor::enableQtKeyExtension()
-{
- m_compositor->enableQtKeyExtension();
-}
-
void WaylandCompositor::enableTouchExtension()
{
m_compositor->enableTouchExtension();
virtual void changeCursor(const QImage &image, int hotspotX, int hotspotY);
void enableSubSurfaceExtension();
- void enableQtKeyExtension();
void enableTouchExtension();
enum TouchExtensionFlag {
, m_surfaceExtension(0)
, m_subSurfaceExtension(0)
, m_touchExtension(0)
- , m_qtkeyExtension(0)
, m_retainNotify(0)
{
compositor = this;
m_outputExtension = new OutputExtensionGlobal(this);
m_surfaceExtension = new SurfaceExtensionGlobal(this);
+ m_qtkeyExtension = new QtKeyExtensionGlobal(this);
if (wl_display_add_socket(m_display->handle(), qt_compositor->socketName())) {
fprintf(stderr, "Fatal: Failed to open server socket\n");
}
}
-void Compositor::enableQtKeyExtension()
-{
- if (!m_qtkeyExtension)
- m_qtkeyExtension = new QtKeyExtensionGlobal(this);
-}
-
void Compositor::configureTouchExtension(int flags)
{
if (m_touchExtension)
TouchExtensionGlobal *touchExtension() { return m_touchExtension; }
void configureTouchExtension(int flags);
- void enableQtKeyExtension();
QtKeyExtensionGlobal *qtkeyExtension() { return m_qtkeyExtension; }
bool isDragging() const;
}
QtKeyExtensionGlobal *ext = m_compositor->qtkeyExtension();
- if (ext) {
- ext->postQtKeyEvent(event, keyboardFocus());
+ if (ext && ext->postQtKeyEvent(event, keyboardFocus()))
return;
- }
if (event->type() == QEvent::KeyPress)
sendKeyPressEvent(event->nativeScanCode());
self->m_resources.append(resource);
}
-void QtKeyExtensionGlobal::postQtKeyEvent(QKeyEvent *event, Surface *surface)
+bool QtKeyExtensionGlobal::postQtKeyEvent(QKeyEvent *event, Surface *surface)
{
wl_client *surfaceClient = surface->base()->resource.client;
uint32_t time = m_compositor->currentTimeMsecs();
textUtf8.constData(),
event->isAutoRepeat(),
event->count());
+
+ return true;
}
+
+ return false;
}
}
QtKeyExtensionGlobal(Compositor *compositor);
~QtKeyExtensionGlobal();
- void postQtKeyEvent(QKeyEvent *event, Surface *surface);
+ bool postQtKeyEvent(QKeyEvent *event, Surface *surface);
private:
static void bind_func(struct wl_client *client, void *data,