Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandxdgshellintegration_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QWAYLANDXDGSHELLINTEGRATION_H
6#define QWAYLANDXDGSHELLINTEGRATION_H
7
8#include <QtWaylandCompositor/private/qwaylandquickshellsurfaceitem_p.h>
9#include <QtWaylandCompositor/QWaylandQuickShellSurfaceItem>
10#include <QtWaylandCompositor/QWaylandXdgToplevel>
11
12QT_BEGIN_NAMESPACE
13
14//
15// W A R N I N G
16// -------------
17//
18// This file is not part of the Qt API. It exists purely as an
19// implementation detail. This header file may change from version to
20// version without notice, or even be removed.
21//
22// We mean it.
23//
24
25class QWaylandXdgSurface;
26
27namespace QtWayland {
28
30{
32public:
34
35protected:
36 bool eventFilter(QObject *object, QEvent *event) override;
37
38private Q_SLOTS:
40 void handleStartResize(QWaylandSeat *seat, Qt::Edges edges);
41 void handleSetMaximized();
42 void handleUnsetMaximized();
43 void handleMaximizedChanged();
44 void handleSetFullscreen();
45 void handleUnsetFullscreen();
46 void handleFullscreenChanged();
47 void handleActivatedChanged();
48 void handleSurfaceSizeChanged();
49 void handleToplevelDestroyed();
50 void handleMaximizedSizeChanged();
51 void handleFullscreenSizeChanged();
52
53private:
54 QWaylandQuickShellSurfaceItem *m_item = nullptr;
55 QWaylandXdgSurface *m_xdgSurface = nullptr;
56 QWaylandXdgToplevel *m_toplevel = nullptr;
57
58 enum class GrabberState {
59 Default,
60 Resize,
61 Move
62 };
63 GrabberState grabberState;
64
65 struct {
66 QWaylandSeat *seat = nullptr;
69 } moveState;
70
71 struct {
72 QWaylandSeat *seat = nullptr;
78 bool initialized;
79 } resizeState;
80
81 struct {
83 QPointF initialPosition;
84 } windowedGeometry;
85
86 struct {
88 QMetaObject::Connection sizeChangedConnection; // Depending on whether maximized or fullscreen,
89 // will be hooked to geometry-changed or available-
90 // geometry-changed.
91 } nonwindowedState;
92
93 bool filterPointerMoveEvent(const QPointF &scenePosition);
94 bool filterMouseMoveEvent(QMouseEvent *event);
95 bool filterPointerReleaseEvent();
96 bool filterTouchUpdateEvent(QTouchEvent *event);
97};
98
100{
102public:
104
105private Q_SLOTS:
107
108private:
109 QWaylandQuickShellSurfaceItem *m_item = nullptr;
110 QWaylandXdgSurface *m_xdgSurface = nullptr;
111 QWaylandXdgPopup *m_popup = nullptr;
112};
113
114}
115
116QT_END_NAMESPACE
117
118#endif // QWAYLANDXDGSHELLINTEGRATION_H
bool eventFilter(QObject *object, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
Combined button and popup list for selecting options.
static void handlePopupCreated(QWaylandQuickShellSurfaceItem *parentItem, QWaylandXdgPopup *popup)