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
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
8
10
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
27void 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
37{
38 return m_winid;
39}
40
41QT_END_NAMESPACE
WId winId() const override
Reimplement in subclasses to return a handle to the native window.
void setGeometry(const QRect &) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
\inmodule QtGui
Definition qwindow.h:64
Combined button and popup list for selecting options.
QWidget * w
[0]