Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: src/client/qwaylanddisplay_p.h Change-Id: Ie84862aa41623c11abd8f882f428054f30062c77
This commit is contained in:
commit
9f450e62b9
@ -178,7 +178,7 @@ Copyright © 2015, 2016 Jan Arne Petersen"
|
||||
"Name": "Wayland EGLStream Controller Protocol",
|
||||
"QDocModule": "qtwaylandcompositor",
|
||||
"QtUsage": "Used in the Qt Wayland Compositor",
|
||||
"Files": "wayland-eglstream-controller.xml",
|
||||
"Files": "wl-eglstream-controller.xml",
|
||||
|
||||
"Description": "Allows clients to request that the compositor creates its EGLStream.",
|
||||
"Homepage": "https://github.com/NVIDIA/egl-wayland",
|
||||
|
@ -90,13 +90,6 @@ struct wl_surface *QWaylandDisplay::createSurface(void *handle)
|
||||
return surface;
|
||||
}
|
||||
|
||||
QWaylandShellSurface *QWaylandDisplay::createShellSurface(QWaylandWindow *window)
|
||||
{
|
||||
if (!mWaylandIntegration->shellIntegration())
|
||||
return nullptr;
|
||||
return mWaylandIntegration->shellIntegration()->createShellSurface(window);
|
||||
}
|
||||
|
||||
struct ::wl_region *QWaylandDisplay::createRegion(const QRegion &qregion)
|
||||
{
|
||||
struct ::wl_region *region = mCompositor.create_region();
|
||||
@ -110,12 +103,18 @@ struct ::wl_region *QWaylandDisplay::createRegion(const QRegion &qregion)
|
||||
::wl_subsurface *QWaylandDisplay::createSubSurface(QWaylandWindow *window, QWaylandWindow *parent)
|
||||
{
|
||||
if (!mSubCompositor) {
|
||||
qCWarning(lcQpaWayland) << "Can't create subsurface, not supported by the compositor.";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return mSubCompositor->get_subsurface(window->object(), parent->object());
|
||||
}
|
||||
|
||||
QWaylandShellIntegration *QWaylandDisplay::shellIntegration() const
|
||||
{
|
||||
return mWaylandIntegration->shellIntegration();
|
||||
}
|
||||
|
||||
QWaylandClientBufferIntegration * QWaylandDisplay::clientBufferIntegration() const
|
||||
{
|
||||
return mWaylandIntegration->clientBufferIntegration();
|
||||
|
@ -98,7 +98,7 @@ class QWaylandQtKeyExtension;
|
||||
class QWaylandWindow;
|
||||
class QWaylandIntegration;
|
||||
class QWaylandHardwareIntegration;
|
||||
class QWaylandShellSurface;
|
||||
class QWaylandShellIntegration;
|
||||
class QWaylandCursor;
|
||||
class QWaylandCursorTheme;
|
||||
|
||||
@ -124,13 +124,13 @@ public:
|
||||
QWaylandScreen *screenForOutput(struct wl_output *output) const;
|
||||
|
||||
struct wl_surface *createSurface(void *handle);
|
||||
QWaylandShellSurface *createShellSurface(QWaylandWindow *window);
|
||||
struct ::wl_region *createRegion(const QRegion &qregion);
|
||||
struct ::wl_subsurface *createSubSurface(QWaylandWindow *window, QWaylandWindow *parent);
|
||||
|
||||
QWaylandShellIntegration *shellIntegration() const;
|
||||
QWaylandClientBufferIntegration *clientBufferIntegration() const;
|
||||
|
||||
QWaylandWindowManagerIntegration *windowManagerIntegration() const;
|
||||
|
||||
#if QT_CONFIG(cursor)
|
||||
QWaylandCursor *waylandCursor();
|
||||
QWaylandCursorTheme *loadCursorTheme(const QString &name, int pixelSize);
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include "qwaylandnativeinterface_p.h"
|
||||
#include "qwaylanddecorationfactory_p.h"
|
||||
#include "qwaylandshmbackingstore_p.h"
|
||||
#include "qwaylandshellintegration_p.h"
|
||||
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QPointer>
|
||||
@ -127,8 +128,9 @@ void QWaylandWindow::initWindow()
|
||||
}
|
||||
} else if (shouldCreateShellSurface()) {
|
||||
Q_ASSERT(!mShellSurface);
|
||||
Q_ASSERT(mDisplay->shellIntegration());
|
||||
|
||||
mShellSurface = mDisplay->createShellSurface(this);
|
||||
mShellSurface = mDisplay->shellIntegration()->createShellSurface(this);
|
||||
if (mShellSurface) {
|
||||
// Set initial surface title
|
||||
setWindowTitle(window()->title());
|
||||
@ -200,6 +202,9 @@ void QWaylandWindow::initializeWlSurface()
|
||||
|
||||
bool QWaylandWindow::shouldCreateShellSurface() const
|
||||
{
|
||||
if (!mDisplay->shellIntegration())
|
||||
return false;
|
||||
|
||||
if (shouldCreateSubSurface())
|
||||
return false;
|
||||
|
||||
@ -968,9 +973,16 @@ void QWaylandWindow::requestActivateWindow()
|
||||
|
||||
bool QWaylandWindow::isExposed() const
|
||||
{
|
||||
if (!window()->isVisible())
|
||||
return false;
|
||||
|
||||
if (mShellSurface)
|
||||
return window()->isVisible() && mShellSurface->isExposed();
|
||||
return QPlatformWindow::isExposed();
|
||||
return mShellSurface->isExposed();
|
||||
|
||||
if (mSubSurfaceWindow)
|
||||
return mSubSurfaceWindow->parent()->isExposed();
|
||||
|
||||
return !(shouldCreateShellSurface() || shouldCreateSubSurface());
|
||||
}
|
||||
|
||||
bool QWaylandWindow::isActive() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user