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
qwaylandshmwindow.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
"qwaylandshmwindow_p.h"
6
7
#
include
"qwaylandbuffer_p.h"
8
9
#
include
<
QtCore
/
QDebug
>
10
11
QT_BEGIN_NAMESPACE
12
13
namespace
QtWaylandClient
{
14
15
QWaylandShmWindow
::
QWaylandShmWindow
(
QWindow
*
window
,
QWaylandDisplay
*
display
)
16
:
QWaylandWindow
(
window
,
display
)
17
{
18
mSurfaceFormat
.
setRedBufferSize
(8);
19
mSurfaceFormat
.
setGreenBufferSize
(8);
20
mSurfaceFormat
.
setBlueBufferSize
(8);
21
22
const
QSurfaceFormat
format
=
window
->
requestedFormat
();
23
mSurfaceFormat
.
setAlphaBufferSize
(
format
.
hasAlpha
() ? 8 : 0);
24
}
25
26
QWaylandShmWindow
::~
QWaylandShmWindow
()
27
{
28
}
29
30
QWaylandWindow
::
WindowType
QWaylandShmWindow
::
windowType
()
const
31
{
32
return
QWaylandWindow
::
Shm
;
33
}
34
35
bool
QWaylandShmWindow
::
createDecoration
()
36
{
37
bool
rc
=
QWaylandWindow
::
createDecoration
();
38
39
const
QSurfaceFormat
format
=
window
()->
requestedFormat
();
40
if
(!
format
.
hasAlpha
())
41
mSurfaceFormat
.
setAlphaBufferSize
(
mWindowDecorationEnabled
? 8 : 0);
42
43
return
rc
;
44
}
45
46
}
47
48
QT_END_NAMESPACE
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
qwaylandshmwindow.cpp
Generated on
for Qt by
1.16.1