1// Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#include "qwaylandshell.h"
5#include "qwaylandshell_p.h"
6
7QT_BEGIN_NAMESPACE
8
9QWaylandShellPrivate::QWaylandShellPrivate()
10{
11}
12
13QWaylandShell::QWaylandShell()
14{
15}
16
17QWaylandShell::QWaylandShell(QWaylandObject *waylandObject)
18 : QWaylandCompositorExtension(waylandObject, *new QWaylandShellPrivate())
19{
20}
21
22/*!
23 * \enum QWaylandShell::FocusPolicy
24 *
25 * This enum type is used to specify the focus policy for shell surfaces.
26 *
27 * \value AutomaticFocus Shell surfaces will automatically get keyboard focus when they are created.
28 * \value ManualFocus The compositor will decide whether shell surfaces should get keyboard focus or not.
29 */
30
31/*!
32 * \qmlproperty enumeration Shell::focusPolicy
33 *
34 * This property holds the focus policy of the Shell.
35 */
36
37/*!
38 * \property QWaylandShell::focusPolicy
39 *
40 * This property holds the focus policy of the QWaylandShell.
41 */
42QWaylandShell::FocusPolicy QWaylandShell::focusPolicy() const
43{
44 Q_D(const QWaylandShell);
45 return d->focusPolicy;
46}
47
48void QWaylandShell::setFocusPolicy(QWaylandShell::FocusPolicy focusPolicy)
49{
50 Q_D(QWaylandShell);
51
52 if (d->focusPolicy == focusPolicy)
53 return;
54
55 d->focusPolicy = focusPolicy;
56 emit focusPolicyChanged();
57}
58
59QWaylandShell::QWaylandShell(QWaylandShellPrivate &dd)
60 : QWaylandCompositorExtension(dd)
61{
62}
63
64QWaylandShell::QWaylandShell(QWaylandObject *container, QWaylandShellPrivate &dd)
65 : QWaylandCompositorExtension(container, dd)
66{
67}
68
69QT_END_NAMESPACE
70
71#include "moc_qwaylandshell.cpp"
72

source code of qtwayland/src/compositor/extensions/qwaylandshell.cpp