Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qminimaleglwindow.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
<
qpa
/
qwindowsysteminterface
.
h
>
6
7
#
include
"qminimaleglwindow.h"
8
9
QT_BEGIN_NAMESPACE
10
11
QMinimalEglWindow
::
QMinimalEglWindow
(
QWindow
*
w
)
12
:
QPlatformWindow
(
w
)
13
{
14
static
int
serialNo = 0;
15
m_winid = ++serialNo;
16
#
ifdef
QEGL_EXTRA_DEBUG
17
qWarning(
"QEglWindow %p: %p 0x%x\n"
,
this
, w, uint(m_winid));
18
#
endif
19
20
QRect screenGeometry(screen()->availableGeometry());
21
if
(w->geometry() != screenGeometry) {
22
QWindowSystemInterface::handleGeometryChange(w, screenGeometry);
23
}
24
w->setSurfaceType(QSurface::OpenGLSurface);
25
}
26
27
void
QMinimalEglWindow
::
setGeometry
(
const
QRect &)
28
{
29
// We only support full-screen windows
30
QRect rect(screen()->availableGeometry());
31
QWindowSystemInterface::handleGeometryChange(window(), rect);
32
33
QPlatformWindow::setGeometry(rect);
34
}
35
36
WId
QMinimalEglWindow
::
winId
()
const
37
{
38
return
m_winid;
39
}
40
41
QT_END_NAMESPACE
QMinimalEglWindow
Definition
qminimaleglwindow.h:15
QMinimalEglWindow::winId
WId winId() const override
Reimplement in subclasses to return a handle to the native window.
Definition
qminimaleglwindow.cpp:36
QMinimalEglWindow::setGeometry
void setGeometry(const QRect &) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
Definition
qminimaleglwindow.cpp:27
QWindow
\inmodule QtGui
Definition
qwindow.h:64
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
w
QWidget * w
[0]
Definition
src_widgets_util_qscroller.cpp:5
qtbase
src
plugins
platforms
minimalegl
qminimaleglwindow.cpp
Generated on
for Qt by
1.18.0