56 void setAppId(
const QString &appId)
override;
57 void setWindowFlags(Qt::WindowFlags
flags)
override;
59 bool isExposed()
const override;
60 bool handleExpose(
const QRegion &)
override;
62 void applyConfigure()
override;
63 bool wantsDecorations()
const override;
64 void propagateSizeHints()
override;
65 void setWindowGeometry(
const QRect &
rect)
override;
66 bool requestActivate()
override;
67 bool requestActivateOnShow()
override;
68 void setXdgActivationToken(
const QString &
token)
override;
69 void requestXdgActivationToken(
quint32 serial)
override;
70 void setAlertState(
bool enabled)
override;
72 QString externWindowHandle()
override;
76 void *nativeResource(
const QByteArray &resource);
78 std::any surfaceRole()
const override;
81 void requestWindowStates(Qt::WindowStates
states)
override;
82 void xdg_surface_configure(uint32_t serial)
override;
85 class Toplevel:
public QtWayland::xdg_toplevel
91 void applyConfigure();
92 bool wantsDecorations();
94 void xdg_toplevel_configure(int32_t
width, int32_t
height, wl_array *
states)
override;
95 void xdg_toplevel_close()
override;
96 void xdg_toplevel_configure_bounds(int32_t
width, int32_t
height)
override;
98 void requestWindowFlags(Qt::WindowFlags
flags);
99 void requestWindowStates(Qt::WindowStates
states);
101 static resize_edge convertToResizeEdges(Qt::Edges edges);
104 QSize bounds = {0, 0};
107 bool suspended =
false;
108 } m_pending, m_applied;
109 QWaylandWindow::ToplevelWindowTilingStates m_toplevelStates = QWaylandWindow::WindowNoState;
114 QScopedPointer<QWaylandXdgExportedV2> m_exported;
115 QScopedPointer<QWaylandXdgDialogV1> m_xdgDialog;
118 class Popup :
public QtWayland::xdg_popup {
123 void applyConfigure();
124 void resetConfiguration();
126 void grab(QWaylandInputDevice *seat,
uint serial);
127 void xdg_popup_configure(int32_t
x, int32_t
y, int32_t
width, int32_t
height)
override;
128 void xdg_popup_popup_done()
override;
132 QWaylandWindow *m_parent =
nullptr;
133 bool m_grabbing =
false;
135 QRect m_pendingGeometry;
139 void setPopup(QWaylandWindow *parent);
140 void setGrabPopup(QWaylandWindow *parent, QWaylandInputDevice *
device,
int serial);
143 QWaylandWindow *m_window =
nullptr;
144 Toplevel *m_toplevel =
nullptr;
145 Popup *m_popup =
nullptr;
146 bool m_configured =
false;
147 uint m_pendingConfigureSerial = 0;
148 uint m_appliedConfigureSerial = 0;
151 bool m_alertState =
false;
170 static void handleRegistryGlobal(
void *
data, ::wl_registry *registry,
uint id,
174 QtWayland::xdg_wm_base *m_xdgWmBase =
nullptr;
175 QScopedPointer<QWaylandXdgDecorationManagerV1> m_xdgDecorationManager;
176 QScopedPointer<QWaylandXdgActivationV1> m_xdgActivation;
177 QScopedPointer<QWaylandXdgExporterV2> m_xdgExporter;
178 QScopedPointer<QWaylandXdgDialogWmV1> m_xdgDialogWm;