summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandinput_p.h
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@theqtcompany.com>2016-02-17 12:51:54 +0100
committerJohan Helsing <johan.helsing@theqtcompany.com>2016-03-24 11:30:33 +0000
commitd87d8b8afdd377e17a98b4d0f51c4bb0aaec25c2 (patch)
tree675df7cb09e6da37db7b6eb654371f1412f10fa5 /src/compositor/compositor_api/qwaylandinput_p.h
parentbfa0951619e56e856cc1443f78fbdb66e3bde009 (diff)
Initial compositor support for xdg-shell wayland extension
xdg-shell is an extension to the wayland protocol providing functionality suited towards traditional desktop environments. Most of the examples from Weston now require xdg-shell, ivi-shell or some other custom extension. In order for our compositor-api to support those examples and many real-world applications, we needed a compositor implementation of xdg-shell. This commit adds a class QWaylandXdgShell, along with QWaylandXdgSurface and QWaylandXdgPopup. These clases are used almost exactly like the corresponding QWaylandShell* variants. qwindow-compositor has been updated to use the new functionality. qwindow-compositor now only sets focus on surfaces that have a role. weston-terminal was crashing because we set keyboard focus on the cursor surface. Keyboard focus handling has been slightly changed. Most of the functionality has been moved from QWaylandKeyboard::setFocus to QWaylandInputDevice::setKeyboardFocus. This is done in order to track where the keyboard focus should have been, in case the input device (seat) does not currently have a keyboard capability. If a keyboard capability is later set on the input device, its focus will automatically be set to the value stored in QWaylandInputDevice. The reason for the change in keyboard focus handling is that we need to know if an xdgSurface has keyboard focus in order to know whether to send the Activated state in configure events. The Activated state tells the client to draw itself as having focus (i.e. title bar not grayed out). Change-Id: I1b1ca9a4223e87f5ade1e0f4c975979a400c38cb Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Diffstat (limited to 'src/compositor/compositor_api/qwaylandinput_p.h')
-rw-r--r--src/compositor/compositor_api/qwaylandinput_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandinput_p.h b/src/compositor/compositor_api/qwaylandinput_p.h
index ec8742d15..5e57c43cc 100644
--- a/src/compositor/compositor_api/qwaylandinput_p.h
+++ b/src/compositor/compositor_api/qwaylandinput_p.h
@@ -115,6 +115,7 @@ protected:
private:
QWaylandCompositor *compositor;
QWaylandView *mouseFocus;
+ QWaylandSurface *keyboardFocus;
QWaylandInputDevice::CapabilityFlags capabilities;
QScopedPointer<QWaylandPointer> pointer;