1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include "qwaylandshellsurface_p.h" |
5 | #include "qwaylandwindow_p.h" |
6 | #include "qwaylandextendedsurface_p.h" |
7 | #include "qwaylandinputdevice_p.h" |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | namespace QtWaylandClient { |
12 | |
13 | QWaylandShellSurface::QWaylandShellSurface(QWaylandWindow *window) |
14 | : m_window(window) |
15 | { |
16 | } |
17 | |
18 | void QWaylandShellSurface::setWindowFlags(Qt::WindowFlags flags) |
19 | { |
20 | Q_UNUSED(flags); |
21 | } |
22 | |
23 | void QWaylandShellSurface::sendProperty(const QString &name, const QVariant &value) |
24 | { |
25 | Q_UNUSED(name); |
26 | Q_UNUSED(value); |
27 | } |
28 | |
29 | QPlatformWindow *QWaylandShellSurface::platformWindow() |
30 | { |
31 | return m_window; |
32 | } |
33 | |
34 | wl_surface *QWaylandShellSurface::wlSurface() |
35 | { |
36 | return m_window ? m_window->wlSurface() : nullptr; |
37 | } |
38 | |
39 | void QWaylandShellSurface::resizeFromApplyConfigure(const QSize &sizeWithMargins, const QPoint &offset) |
40 | { |
41 | m_window->resizeFromApplyConfigure(sizeWithMargins, offset); |
42 | } |
43 | |
44 | void QWaylandShellSurface::repositionFromApplyConfigure(const QPoint &position) |
45 | { |
46 | m_window->repositionFromApplyConfigure(position); |
47 | } |
48 | |
49 | void QWaylandShellSurface::setGeometryFromApplyConfigure(const QPoint &globalPosition, const QSize &sizeWithMargins) |
50 | { |
51 | m_window->setGeometryFromApplyConfigure(globalPosition, sizeWithMargins); |
52 | } |
53 | |
54 | void QWaylandShellSurface::applyConfigureWhenPossible() |
55 | { |
56 | m_window->applyConfigureWhenPossible(); |
57 | } |
58 | |
59 | void QWaylandShellSurface::handleActivationChanged(bool activated) |
60 | { |
61 | if (activated) |
62 | m_window->display()->handleWindowActivated(window: m_window); |
63 | else |
64 | m_window->display()->handleWindowDeactivated(window: m_window); |
65 | } |
66 | |
67 | uint32_t QWaylandShellSurface::getSerial(QWaylandInputDevice *inputDevice) |
68 | { |
69 | return inputDevice->serial(); |
70 | } |
71 | |
72 | void QWaylandShellSurface::setXdgActivationToken(const QString &token) |
73 | { |
74 | Q_UNUSED(token); |
75 | qCWarning(lcQpaWayland) << "setXdgActivationToken not implemented"<< token; |
76 | } |
77 | |
78 | void QWaylandShellSurface::requestXdgActivationToken(quint32 serial) |
79 | { |
80 | Q_UNUSED(serial); |
81 | Q_EMIT m_window->xdgActivationTokenCreated({}); |
82 | } |
83 | } |
84 | |
85 | QT_END_NAMESPACE |
86 | |
87 | #include "moc_qwaylandshellsurface_p.cpp" |
88 |