Merge remote-tracking branch 'qt/5.8' into 5.9
Change-Id: I43cd0147a63b5523e3112f09bbfe60e1d6636e6c
This commit is contained in:
commit
a89c479a01
@ -82,7 +82,7 @@
|
|||||||
"output": [ "privateFeature" ]
|
"output": [ "privateFeature" ]
|
||||||
},
|
},
|
||||||
"wayland-brcm": {
|
"wayland-brcm": {
|
||||||
"label": "Rasberry Pi",
|
"label": "Raspberry Pi",
|
||||||
"condition": "features.wayland-client && features.eglfs_brcm",
|
"condition": "features.wayland-client && features.eglfs_brcm",
|
||||||
"output": [ "privateFeature" ]
|
"output": [ "privateFeature" ]
|
||||||
},
|
},
|
||||||
|
@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
namespace QtWaylandClient {
|
namespace QtWaylandClient {
|
||||||
|
|
||||||
class QWaylandXCompositeEglClientBufferIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin
|
class QWaylandXCompositeEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlugin
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-egl.json")
|
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-egl.json")
|
||||||
@ -52,7 +52,7 @@ public:
|
|||||||
QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override;
|
QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
QWaylandClientBufferIntegration *QWaylandXCompositeEglClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
QWaylandClientBufferIntegration *QWaylandXCompositeEglClientBufferPlugin::create(const QString& system, const QStringList& paramList)
|
||||||
{
|
{
|
||||||
Q_UNUSED(paramList);
|
Q_UNUSED(paramList);
|
||||||
Q_UNUSED(system);
|
Q_UNUSED(system);
|
||||||
|
@ -11,5 +11,5 @@ SOURCES += \
|
|||||||
main.cpp
|
main.cpp
|
||||||
|
|
||||||
PLUGIN_TYPE = wayland-graphics-integration-client
|
PLUGIN_TYPE = wayland-graphics-integration-client
|
||||||
PLUGIN_CLASS_NAME = QWaylandXCompositeEglClientBufferIntegrationPlugin
|
PLUGIN_CLASS_NAME = QWaylandXCompositeEglClientBufferPlugin
|
||||||
load(qt_plugin)
|
load(qt_plugin)
|
||||||
|
@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
namespace QtWaylandClient {
|
namespace QtWaylandClient {
|
||||||
|
|
||||||
class QWaylandXCompositeGlxClientBufferIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin
|
class QWaylandXCompositeGlxClientBufferPlugin : public QWaylandClientBufferIntegrationPlugin
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-glx.json")
|
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-glx.json")
|
||||||
@ -52,7 +52,7 @@ public:
|
|||||||
QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override;
|
QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
QWaylandClientBufferIntegration *QWaylandXCompositeGlxClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
QWaylandClientBufferIntegration *QWaylandXCompositeGlxClientBufferPlugin::create(const QString& system, const QStringList& paramList)
|
||||||
{
|
{
|
||||||
Q_UNUSED(paramList);
|
Q_UNUSED(paramList);
|
||||||
Q_UNUSED(system);
|
Q_UNUSED(system);
|
||||||
|
@ -8,5 +8,5 @@ SOURCES += \
|
|||||||
main.cpp
|
main.cpp
|
||||||
|
|
||||||
PLUGIN_TYPE = wayland-graphics-integration-client
|
PLUGIN_TYPE = wayland-graphics-integration-client
|
||||||
PLUGIN_CLASS_NAME = QWaylandXCompositeGlxClientBufferIntegrationPlugin
|
PLUGIN_CLASS_NAME = QWaylandXCompositeGlxClientBufferPlugin
|
||||||
load(qt_plugin)
|
load(qt_plugin)
|
||||||
|
@ -421,7 +421,14 @@ void QWaylandDisplay::handleKeyboardFocusChanged(QWaylandInputDevice *inputDevic
|
|||||||
if (mLastKeyboardFocus == keyboardFocus)
|
if (mLastKeyboardFocus == keyboardFocus)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mWaylandIntegration->mShellIntegration->handleKeyboardFocusChanged(keyboardFocus, mLastKeyboardFocus);
|
if (mWaylandIntegration->mShellIntegration) {
|
||||||
|
mWaylandIntegration->mShellIntegration->handleKeyboardFocusChanged(keyboardFocus, mLastKeyboardFocus);
|
||||||
|
} else {
|
||||||
|
if (keyboardFocus)
|
||||||
|
handleWindowActivated(keyboardFocus);
|
||||||
|
if (mLastKeyboardFocus)
|
||||||
|
handleWindowDeactivated(mLastKeyboardFocus);
|
||||||
|
}
|
||||||
|
|
||||||
mLastKeyboardFocus = keyboardFocus;
|
mLastKeyboardFocus = keyboardFocus;
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,7 @@ QWaylandWindow::QWaylandWindow(QWindow *window)
|
|||||||
{
|
{
|
||||||
static WId id = 1;
|
static WId id = 1;
|
||||||
mWindowId = id++;
|
mWindowId = id++;
|
||||||
|
initializeWlSurface();
|
||||||
}
|
}
|
||||||
|
|
||||||
QWaylandWindow::~QWaylandWindow()
|
QWaylandWindow::~QWaylandWindow()
|
||||||
@ -127,7 +128,7 @@ void QWaylandWindow::initWindow()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!isInitialized())
|
if (!isInitialized())
|
||||||
init(mDisplay->createSurface(static_cast<QtWayland::wl_surface *>(this)));
|
initializeWlSurface();
|
||||||
|
|
||||||
if (shouldCreateSubSurface()) {
|
if (shouldCreateSubSurface()) {
|
||||||
Q_ASSERT(!mSubSurfaceWindow);
|
Q_ASSERT(!mSubSurfaceWindow);
|
||||||
@ -200,6 +201,11 @@ void QWaylandWindow::initWindow()
|
|||||||
mFlags = window()->flags();
|
mFlags = window()->flags();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QWaylandWindow::initializeWlSurface()
|
||||||
|
{
|
||||||
|
init(mDisplay->createSurface(static_cast<QtWayland::wl_surface *>(this)));
|
||||||
|
}
|
||||||
|
|
||||||
bool QWaylandWindow::shouldCreateShellSurface() const
|
bool QWaylandWindow::shouldCreateShellSurface() const
|
||||||
{
|
{
|
||||||
if (shouldCreateSubSurface())
|
if (shouldCreateSubSurface())
|
||||||
@ -225,7 +231,8 @@ void QWaylandWindow::reset()
|
|||||||
mShellSurface = 0;
|
mShellSurface = 0;
|
||||||
delete mSubSurfaceWindow;
|
delete mSubSurfaceWindow;
|
||||||
mSubSurfaceWindow = 0;
|
mSubSurfaceWindow = 0;
|
||||||
destroy();
|
if (isInitialized())
|
||||||
|
destroy();
|
||||||
|
|
||||||
if (mFrameCallback)
|
if (mFrameCallback)
|
||||||
wl_callback_destroy(mFrameCallback);
|
wl_callback_destroy(mFrameCallback);
|
||||||
@ -360,8 +367,11 @@ void QWaylandWindow::setMask(const QRegion &mask)
|
|||||||
|
|
||||||
mMask = mask;
|
mMask = mask;
|
||||||
|
|
||||||
|
if (!isInitialized())
|
||||||
|
return;
|
||||||
|
|
||||||
if (mMask.isEmpty()) {
|
if (mMask.isEmpty()) {
|
||||||
set_input_region(0);
|
set_input_region(nullptr);
|
||||||
} else {
|
} else {
|
||||||
struct ::wl_region *region = mDisplay->createRegion(mMask);
|
struct ::wl_region *region = mDisplay->createRegion(mMask);
|
||||||
set_input_region(region);
|
set_input_region(region);
|
||||||
|
@ -248,6 +248,7 @@ private:
|
|||||||
bool setWindowStateInternal(Qt::WindowState flags);
|
bool setWindowStateInternal(Qt::WindowState flags);
|
||||||
void setGeometry_helper(const QRect &rect);
|
void setGeometry_helper(const QRect &rect);
|
||||||
void initWindow();
|
void initWindow();
|
||||||
|
void initializeWlSurface();
|
||||||
bool shouldCreateShellSurface() const;
|
bool shouldCreateShellSurface() const;
|
||||||
bool shouldCreateSubSurface() const;
|
bool shouldCreateSubSurface() const;
|
||||||
void reset();
|
void reset();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user