diff options
author | Liang Qi <liang.qi@qt.io> | 2017-08-17 10:48:22 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-08-17 10:48:28 +0200 |
commit | e99dae74353e5652794d7bcbcd3d79b1478debbc (patch) | |
tree | 6d0ab88f8aa6f464e66429899418f1adf63b0651 /src | |
parent | e3feecfd96d8fcd65556d325c806153a3495d5b3 (diff) | |
parent | 7f70da6a644bc5b690066f0ab4814e1358f57e81 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
.qmake.conf
Change-Id: Ia0f9d099e92a40cae7ec506781f70c56415bcf89
Diffstat (limited to 'src')
-rw-r--r-- | src/client/configure.json | 3 | ||||
-rw-r--r-- | src/client/qwaylandinputcontext.cpp | 6 | ||||
-rw-r--r-- | src/client/qwaylandwindow.cpp | 6 | ||||
-rw-r--r-- | src/client/qwaylandxdgshellv6.cpp | 10 | ||||
-rw-r--r-- | src/client/qwaylandxdgshellv6_p.h | 2 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickitem.cpp | 2 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandseat.h | 1 | ||||
-rw-r--r-- | src/compositor/configure.json | 3 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp | 13 |
9 files changed, 33 insertions, 13 deletions
diff --git a/src/client/configure.json b/src/client/configure.json index d216960e1..b11416f68 100644 --- a/src/client/configure.json +++ b/src/client/configure.json @@ -28,7 +28,8 @@ "test": "wayland_egl", "sources": [ { "type": "pkgConfig", "args": "wayland-egl" }, - "-lwayland-egl" + "-lwayland-egl", + "-lEGL" ] }, "xcomposite": { diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp index dcc4ad5c7..fac5fb840 100644 --- a/src/client/qwaylandinputcontext.cpp +++ b/src/client/qwaylandinputcontext.cpp @@ -541,8 +541,10 @@ void QWaylandInputContext::setFocusObject(QObject *) if (window && window->handle() && inputMethodAccepted()) { if (mCurrentWindow.data() != window) { struct ::wl_surface *surface = static_cast<QWaylandWindow *>(window->handle())->object(); - textInput()->enable(surface); - mCurrentWindow = window; + if (surface) { + textInput()->enable(surface); + mCurrentWindow = window; + } } textInput()->updateState(Qt::ImQueryAll, QtWayland::zwp_text_input_v2::update_state_enter); } diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 5bfa158ae..9cc673c0c 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -256,8 +256,10 @@ void QWaylandWindow::reset(bool sendDestroyEvent) if (isInitialized()) destroy(); - if (mFrameCallback) + if (mFrameCallback) { wl_callback_destroy(mFrameCallback); + mFrameCallback = nullptr; + } } QWaylandWindow *QWaylandWindow::fromWlSurface(::wl_surface *surface) @@ -725,6 +727,8 @@ QWaylandWindow *QWaylandWindow::transientParent() const // events. if (auto transientParent = window()->transientParent()) return static_cast<QWaylandWindow *>(topLevelWindow(transientParent)->handle()); + else if (QGuiApplication::focusWindow() && (window()->type() == Qt::ToolTip || window()->type() == Qt::Popup)) + return static_cast<QWaylandWindow *>(topLevelWindow(QGuiApplication::focusWindow())->handle()); return nullptr; } diff --git a/src/client/qwaylandxdgshellv6.cpp b/src/client/qwaylandxdgshellv6.cpp index 947940213..cd81778c7 100644 --- a/src/client/qwaylandxdgshellv6.cpp +++ b/src/client/qwaylandxdgshellv6.cpp @@ -163,8 +163,8 @@ void QWaylandXdgSurfaceV6::setAppId(const QString &appId) void QWaylandXdgSurfaceV6::setType(Qt::WindowType type, QWaylandWindow *transientParent) { - if (type == Qt::Popup && transientParent) { - setPopup(transientParent, m_window->display()->lastInputDevice(), m_window->display()->lastInputSerial()); + if ((type == Qt::Popup || type == Qt::ToolTip) && transientParent) { + setPopup(transientParent, m_window->display()->lastInputDevice(), m_window->display()->lastInputSerial(), type == Qt::Popup); } else { setToplevel(); if (transientParent) { @@ -189,7 +189,7 @@ void QWaylandXdgSurfaceV6::setToplevel() m_toplevel = new Toplevel(this); } -void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial) +void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial, bool grab) { Q_ASSERT(!m_toplevel && !m_popup); @@ -209,7 +209,9 @@ void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice m_popup = new Popup(this, parentXdgSurface, positioner); positioner->destroy(); delete positioner; - m_popup->grab(device->wl_seat(), serial); + if (grab) { + m_popup->grab(device->wl_seat(), serial); + } } void QWaylandXdgSurfaceV6::zxdg_surface_v6_configure(uint32_t serial) diff --git a/src/client/qwaylandxdgshellv6_p.h b/src/client/qwaylandxdgshellv6_p.h index 12f7301d5..769f19837 100644 --- a/src/client/qwaylandxdgshellv6_p.h +++ b/src/client/qwaylandxdgshellv6_p.h @@ -121,7 +121,7 @@ private: }; void setToplevel(); - void setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial); + void setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial, bool grab); QWaylandXdgShellV6 *m_shell; QWaylandWindow *m_window; diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp index 3f5bbc715..bfd252753 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.cpp +++ b/src/compositor/compositor_api/qwaylandquickitem.cpp @@ -742,7 +742,7 @@ void QWaylandQuickItem::handleSubsurfaceAdded(QWaylandSurface *childSurface) /*! - \qmlproperty bool QtWaylandCompositor::WaylandQuickItem::subsurfaceHandler + \qmlproperty object QtWaylandCompositor::WaylandQuickItem::subsurfaceHandler This property provides a way to override the default subsurface behavior. diff --git a/src/compositor/compositor_api/qwaylandseat.h b/src/compositor/compositor_api/qwaylandseat.h index 5af10a45a..86cf250a6 100644 --- a/src/compositor/compositor_api/qwaylandseat.h +++ b/src/compositor/compositor_api/qwaylandseat.h @@ -97,7 +97,6 @@ public: void sendKeyReleaseEvent(uint code); void sendFullKeyEvent(QKeyEvent *event); - void sendFullKeyEvent(QWaylandSurface *surface, QKeyEvent *event); uint sendTouchPointEvent(QWaylandSurface *surface, int id, const QPointF &point, Qt::TouchPointState state); void sendTouchFrameEvent(QWaylandClient *client); diff --git a/src/compositor/configure.json b/src/compositor/configure.json index 733ccfc03..a95c4eb01 100644 --- a/src/compositor/configure.json +++ b/src/compositor/configure.json @@ -18,7 +18,8 @@ "test": "wayland_egl", "sources": [ { "type": "pkgConfig", "args": "wayland-egl" }, - "-lwayland-egl" + "-lwayland-egl", + "-lEGL" ] }, "xcomposite": { diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp b/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp index e468220f9..bc23131be 100644 --- a/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp +++ b/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp @@ -47,6 +47,7 @@ QT_BEGIN_NAMESPACE /*! * \qmltype ShellSurfaceItem + * \inherits WaylandQuickItem * \inqmlmodule QtWayland.Compositor * \since 5.8 * \brief A Qt Quick item type representing a WlShellSurface. @@ -133,9 +134,19 @@ void QWaylandQuickShellSurfaceItem::setShellSurface(QWaylandShellSurface *shellS } /*! + * \qmlproperty Item QtWaylandCompositor::ShellSurfaceItem::moveItem + * + * This property holds the move item for this ShellSurfaceItem. This is the item that will be moved + * when the clients request the ShellSurface to be moved, maximized, resized etc. This property is + * useful when implementing server-side decorations. + */ + +/*! * \property QWaylandQuickShellSurfaceItem::moveItem * - * This property holds the move item for this QWaylandQuickShellSurfaceItem. + * This property holds the move item for this QWaylandQuickShellSurfaceItem. This is the item that + * will be moved when the clients request the QWaylandShellSurface to be moved, maximized, resized + * etc. This property is useful when implementing server-side decorations. */ QQuickItem *QWaylandQuickShellSurfaceItem::moveItem() const { |