diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-11-10 22:42:53 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-11-10 22:42:53 +0200 |
commit | dfb0129c01d2aadc996cce6ef9abcfc49e33ae70 (patch) | |
tree | 21e5b6c82fe0942fdb0ef3e624a7d3d2b4d55857 /src | |
parent | 2ce7b8d2c5355d91642256d9260222d211cc368c (diff) | |
parent | a64c7ab8359ba40f86a04808ce29310fb332f088 (diff) | |
download | qtwayland-dfb0129c01d2aadc996cce6ef9abcfc49e33ae70.tar.gz |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into tqtc/lts-5.15-opensourcev5.15.8-lts-lgpl
Change-Id: Id97943831fbc85d703dc50369e0d975513208c43
Diffstat (limited to 'src')
-rw-r--r-- | src/client/qwaylandinputcontext.cpp | 6 | ||||
-rw-r--r-- | src/client/qwaylandwindow.cpp | 2 | ||||
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 9 | ||||
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h | 1 |
4 files changed, 11 insertions, 7 deletions
diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp index 8b79c08f..84a34674 100644 --- a/src/client/qwaylandinputcontext.cpp +++ b/src/client/qwaylandinputcontext.cpp @@ -387,8 +387,10 @@ void QWaylandTextInput::zwp_text_input_v2_input_method_changed(uint32_t serial, Qt::KeyboardModifiers QWaylandTextInput::modifiersToQtModifiers(uint32_t modifiers) { Qt::KeyboardModifiers ret = Qt::NoModifier; - for (int i = 0; modifiers >>= 1; ++i) { - ret |= m_modifiersMap[i]; + for (int i = 0; i < m_modifiersMap.size(); ++i) { + if (modifiers & (1 << i)) { + ret |= m_modifiersMap[i]; + } } return ret; } diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index afdebf55..cb82857a 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -821,7 +821,7 @@ bool QWaylandWindow::createDecoration() decoration = false; if (mSubSurfaceWindow) decoration = false; - if (mShellSurface && !mShellSurface->wantsDecorations()) + if (!mShellSurface || !mShellSurface->wantsDecorations()) decoration = false; bool hadDecoration = mWindowDecoration; diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index 3a1569f7..f3e3c330 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -335,15 +335,16 @@ bool QWaylandXdgSurface::handleExpose(const QRegion ®ion) void QWaylandXdgSurface::applyConfigure() { - Q_ASSERT(m_pendingConfigureSerial != 0); + // It is a redundant ack_configure, so skipped. + if (m_pendingConfigureSerial == m_appliedConfigureSerial) + return; if (m_toplevel) m_toplevel->applyConfigure(); + m_appliedConfigureSerial = m_pendingConfigureSerial; m_configured = true; - ack_configure(m_pendingConfigureSerial); - - m_pendingConfigureSerial = 0; + ack_configure(m_appliedConfigureSerial); } bool QWaylandXdgSurface::wantsDecorations() const diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h index 0c98be35..96785205 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h @@ -153,6 +153,7 @@ private: bool m_configured = false; QRegion m_exposeRegion; uint m_pendingConfigureSerial = 0; + uint m_appliedConfigureSerial = 0; friend class QWaylandXdgShell; }; |