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
qwaylandwindowmanagerintegration.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
"qwaylandwindowmanagerintegration_p.h"
6
#
include
"qwaylandscreen_p.h"
7
#
include
"qwaylandwindow_p.h"
8
#
include
"qwaylanddisplay_p.h"
9
#
include
"qwaylandshellsurface_p.h"
10
11
#
include
<
stdint
.
h
>
12
#
include
<
QtCore
/
QEvent
>
13
#
include
<
QtCore
/
QHash
>
14
#
include
<
QtCore
/
QUrl
>
15
#
include
<
qpa
/
qplatformnativeinterface
.
h
>
16
#
include
<
qpa
/
qplatformwindow
.
h
>
17
#
include
<
QtGui
/
QtEvents
>
18
#
include
<
QtGui
/
QGuiApplication
>
19
20
#
include
<
QDebug
>
21
22
QT_BEGIN_NAMESPACE
23
24
namespace
QtWaylandClient
{
25
26
QWaylandWindowManagerIntegration
::
QWaylandWindowManagerIntegration
(
QWaylandDisplay
*
waylandDisplay
,
27
uint
id
,
uint
version
)
28
:
QtWayland
::
qt_windowmanager
(
waylandDisplay
->
object
(),
id
,
version
)
29
{
30
}
31
32
QWaylandWindowManagerIntegration
::~
QWaylandWindowManagerIntegration
()
33
{
34
qt_windowmanager_destroy
(
object
());
35
}
36
37
bool
QWaylandWindowManagerIntegration
::
showIsFullScreen
()
const
38
{
39
return
m_showIsFullScreen
;
40
}
41
42
void
QWaylandWindowManagerIntegration
::
windowmanager_hints
(
int32_t
showIsFullScreen
)
43
{
44
m_showIsFullScreen
=
showIsFullScreen
;
45
}
46
47
void
QWaylandWindowManagerIntegration
::
windowmanager_quit
()
48
{
49
QGuiApplication
::
quit
();
50
}
51
52
void
QWaylandWindowManagerIntegration
::
openUrl
(
const
QUrl
&
url
)
53
{
54
QString
data
=
url
.
toString
();
55
static
const
int
chunkSize
= 128;
56
while
(!
data
.
isEmpty
()) {
57
QString
chunk
=
data
.
left
(
chunkSize
);
58
data
=
data
.
mid
(
chunkSize
);
59
if
(
chunk
.
at
(
chunk
.
size
() - 1).
isHighSurrogate
() && !
data
.
isEmpty
()) {
60
chunk
.
append
(
data
.
at
(0));
61
data
=
data
.
mid
(1);
62
}
63
open_url
(!
data
.
isEmpty
(),
chunk
);
64
}
65
}
66
}
67
68
QT_END_NAMESPACE
QtWaylandClient
Definition
qwaylandclientextension.h:16
qtbase
src
plugins
platforms
wayland
qwaylandwindowmanagerintegration.cpp
Generated on
for Qt by
1.16.1