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
4#include <qpa/qwindowsysteminterface.h>
5
7
9
12{
13 static int serialNo = 0;
14 m_winid = ++serialNo;
15#ifdef QEGL_EXTRA_DEBUG
16 qWarning("QEglWindow %p: %p 0x%x\n", this, w, uint(m_winid));
17#endif
18
19 QRect screenGeometry(screen()->availableGeometry());
20 if (w->geometry() != screenGeometry) {
21 QWindowSystemInterface::handleGeometryChange(w, screenGeometry);
22 }
23 w->setSurfaceType(QSurface::OpenGLSurface);
24}
25
26void QMinimalEglWindow::setGeometry(const QRect &)
27{
28 // We only support full-screen windows
29 QRect rect(screen()->availableGeometry());
30 QWindowSystemInterface::handleGeometryChange(window(), rect);
31
32 QPlatformWindow::setGeometry(rect);
33}
34
36{
37 return m_winid;
38}
39
40QT_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:63
QWidget * w
[0]