diff options
author | Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | 2016-08-14 13:28:30 +0200 |
---|---|---|
committer | Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> | 2016-09-30 09:38:56 +0000 |
commit | 9e585fc849c80b04c02c671d908fb5ade6c441b0 (patch) | |
tree | 0eeb11777d59012f8298f1a5d05e0176fda48eb6 /examples | |
parent | 079b260e42cf394a8dbe823763ec455929fba091 (diff) |
Compositor: Base shell class
Standard shell class with focus policy shared by all protocol
implementations.
The automatic focus policy gives focus to windows automatically as they
are created, while the manual policy allows a compositor to decide
what to do.
Change-Id: Ica71271174b30e28217e31c53f1c8dd576752c5e
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/wayland/qwindow-compositor/compositor.cpp | 5 | ||||
-rw-r--r-- | examples/wayland/qwindow-compositor/compositor.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/wayland/qwindow-compositor/compositor.cpp b/examples/wayland/qwindow-compositor/compositor.cpp index eed270cd6..e9231faf9 100644 --- a/examples/wayland/qwindow-compositor/compositor.cpp +++ b/examples/wayland/qwindow-compositor/compositor.cpp @@ -282,9 +282,10 @@ void Compositor::onXdgStartResize(QWaylandSeat *seat, emit startResize(int(edges), true); } -void Compositor::onSetTransient(QWaylandSurface *parent, const QPoint &relativeToParent, QWaylandWlShellSurface::FocusPolicy focusPolicy) +void Compositor::onSetTransient(QWaylandSurface *parent, const QPoint &relativeToParent, bool inactive) { - Q_UNUSED(focusPolicy); + Q_UNUSED(inactive); + QWaylandWlShellSurface *wlShellSurface = qobject_cast<QWaylandWlShellSurface*>(sender()); View *view = findView(wlShellSurface->surface()); diff --git a/examples/wayland/qwindow-compositor/compositor.h b/examples/wayland/qwindow-compositor/compositor.h index 636def97e..b7569082f 100644 --- a/examples/wayland/qwindow-compositor/compositor.h +++ b/examples/wayland/qwindow-compositor/compositor.h @@ -135,7 +135,7 @@ private slots: void onXdgSurfaceCreated(QWaylandXdgSurfaceV5 *xdgSurface); void onXdgPopupRequested(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandSeat *seat, const QPoint &position, const QWaylandResource &resource); - void onSetTransient(QWaylandSurface *parentSurface, const QPoint &relativeToParent, QWaylandWlShellSurface::FocusPolicy focusPolicy); + void onSetTransient(QWaylandSurface *parentSurface, const QPoint &relativeToParent, bool inactive); void onSetPopup(QWaylandSeat *seat, QWaylandSurface *parent, const QPoint &relativeToParent); void onSubsurfaceChanged(QWaylandSurface *child, QWaylandSurface *parent); |