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
qwaylandshellsurface.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
// Qt-Security score:significant reason:default
4
5
#
include
"qwaylandshellsurface_p.h"
6
#
include
"qwaylandwindow_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
::
setWindowGeometry
(
const
QRect
&
rect
)
40
{
41
setWindowPosition
(
rect
.
topLeft
());
42
setWindowSize
(
rect
.
size
());
43
}
44
45
void
QWaylandShellSurface
::
resizeFromApplyConfigure
(
const
QSize
&
sizeWithMargins
,
const
QPoint
&
offset
)
46
{
47
m_window
->
resizeFromApplyConfigure
(
sizeWithMargins
,
offset
);
48
}
49
50
void
QWaylandShellSurface
::
repositionFromApplyConfigure
(
const
QPoint
&
position
)
51
{
52
m_window
->
repositionFromApplyConfigure
(
position
);
53
}
54
55
void
QWaylandShellSurface
::
setGeometryFromApplyConfigure
(
const
QPoint
&
globalPosition
,
const
QSize
&
sizeWithMargins
)
56
{
57
m_window
->
setGeometryFromApplyConfigure
(
globalPosition
,
sizeWithMargins
);
58
}
59
60
void
QWaylandShellSurface
::
applyConfigureWhenPossible
()
61
{
62
m_window
->
applyConfigureWhenPossible
();
63
}
64
65
void
QWaylandShellSurface
::
handleActivationChanged
(
bool
activated
)
66
{
67
if
(
activated
)
68
m_window
->
display
()->
handleWindowActivated
(
m_window
);
69
else
70
m_window
->
display
()->
handleWindowDeactivated
(
m_window
);
71
}
72
73
uint32_t
QWaylandShellSurface
::
getSerial
(
QWaylandInputDevice
*
inputDevice
)
74
{
75
return
inputDevice
->
serial
();
76
}
77
78
void
QWaylandShellSurface
::
setXdgActivationToken
(
const
QString
&
token
)
79
{
80
Q_UNUSED
(
token
);
81
qCWarning
(
lcQpaWayland
) <<
"setXdgActivationToken not implemented"
<<
token
;
82
}
83
84
void
QWaylandShellSurface
::
requestXdgActivationToken
(
quint32
serial
)
85
{
86
Q_UNUSED
(
serial
);
87
Q_EMIT
m_window
->
xdgActivationTokenCreated
({});
88
}
89
90
/*!
91
\internal
92
Determines whether the client should commit the surface with no buffer
93
after creating the role and performing initial setup
94
*/
95
bool
QWaylandShellSurface
::
commitSurfaceRole
()
const
96
{
97
return
true
;
98
}
99
100
}
101
102
QT_END_NAMESPACE
103
104
#
include
"moc_qwaylandshellsurface_p.cpp"
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
QtWaylandClient
Definition
qwaylandclientextension.h:16
qtbase
src
plugins
platforms
wayland
qwaylandshellsurface.cpp
Generated on
for Qt by
1.16.1