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
qwaylandwlshellsurface.cpp
Go to the documentation of this file.
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
5
6#include <QtWaylandClient/private/qwaylanddisplay_p.h>
7#include <QtWaylandClient/private/qwaylandwindow_p.h>
8#include <QtWaylandClient/private/qwaylandinputdevice_p.h>
9#include <QtWaylandClient/private/qwaylandabstractdecoration_p.h>
10#include <QtWaylandClient/private/qwaylandscreen_p.h>
11
12#include <QtCore/QDebug>
13
14QT_BEGIN_NAMESPACE
15
16namespace QtWaylandClient {
17
32
37
44
51
56
61
87
92
94{
95 // On wl-shell the client is in charge of states, so diff from the pending state
98
100 qCWarning(lcQpaWayland) << "Minimizing is not supported on wl-shell. Consider using xdg-shell instead.";
101
103 set_maximized(nullptr);
105 }
106
110 }
111
114 setTopLevel(); // set normal window
115 // There's usually no configure event after this, so just clear the rest of the pending
116 // configure here and queue the applyConfigure call
117 m_pending.size = {0, 0};
120 }
121
123}
124
125enum QWaylandWlShellSurface::resize QWaylandWlShellSurface::convertToResizeEdges(Qt::Edges edges)
126{
127 return static_cast<enum resize>(
128 ((edges & Qt::TopEdge) ? resize_top : 0)
129 | ((edges & Qt::BottomEdge) ? resize_bottom : 0)
130 | ((edges & Qt::LeftEdge) ? resize_left : 0)
131 | ((edges & Qt::RightEdge) ? resize_right : 0));
132}
133
135{
136 set_toplevel();
137}
138
139static inline bool testShowWithoutActivating(const QWindow *window)
140{
141 // QWidget-attribute Qt::WA_ShowWithoutActivating.
142 const QVariant showWithoutActivating = window->property("_q_showWithoutActivating");
143 return showWithoutActivating.isValid() && showWithoutActivating.toBool();
144}
145
147{
150 return;
151
152 // set_transient expects a position relative to the parent
153 QPoint transientPos = m_window->geometry().topLeft(); // this is absolute
158 }
159
160 uint32_t flags = 0;
162 if (wf.testFlag(Qt::ToolTip)
166
170}
171
173{
176 qCWarning(lcQpaWayland) << "setPopup called without a parent window";
177 return;
178 }
179 if (!device) {
180 qCWarning(lcQpaWayland) << "setPopup called without an input device";
181 return;
182 }
183
184 // set_popup expects a position relative to the parent
185 QPoint transientPos = m_window->geometry().topLeft(); // this is absolute
190 }
191
194 uint flags = 0;
196}
197
202
211
216
217}
218
219QT_END_NAMESPACE
220
221#include "moc_qwaylandwlshellsurface_p.cpp"
static bool testShowWithoutActivating(const QWindow *window)