Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libqt5-qtwayland for openSUSE:Factory checked in at 2021-12-21 18:40:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libqt5-qtwayland (Old) and /work/SRC/openSUSE:Factory/.libqt5-qtwayland.new.2520 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libqt5-qtwayland" Tue Dec 21 18:40:18 2021 rev:41 rq:941642 version:5.15.2+kde37 Changes: -------- --- /work/SRC/openSUSE:Factory/libqt5-qtwayland/libqt5-qtwayland.changes 2021-10-31 22:56:06.727719921 +0100 +++ /work/SRC/openSUSE:Factory/.libqt5-qtwayland.new.2520/libqt5-qtwayland.changes 2021-12-21 18:40:21.877859461 +0100 @@ -1,0 +2,11 @@ +Sun Dec 19 14:47:20 UTC 2021 - Fabian Vogt <fab...@ritter-vogt.de> + +- Update to version 5.15.2+kde37: + * Fix backport, context destruction was omitted + * Client: do not empty clipboard when a new popup/window is opened + * Wayland client: use wl_keyboard to determine active state +- Add patch to fix crashes triggered by unintentional actions when + showing a window (kde#421700): + * 0001-Client-Avoid-processing-of-events-when-showing-windo.patch + +------------------------------------------------------------------- Old: ---- qtwayland-everywhere-src-5.15.2+kde34.obscpio New: ---- 0001-Client-Avoid-processing-of-events-when-showing-windo.patch qtwayland-everywhere-src-5.15.2+kde37.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libqt5-qtwayland.spec ++++++ --- /var/tmp/diff_new_pack.hWF92G/_old 2021-12-21 18:40:22.749860243 +0100 +++ /var/tmp/diff_new_pack.hWF92G/_new 2021-12-21 18:40:22.753860247 +0100 @@ -26,7 +26,7 @@ %define so_version 5.15.2 %define tar_version qtwayland-everywhere-src-%{version} Name: libqt5-qtwayland -Version: 5.15.2+kde34 +Version: 5.15.2+kde37 Release: 0 Summary: Qt 5 Wayland Addon # The wayland compositor files are GPL-3.0-or-later @@ -37,9 +37,11 @@ Source1: baselibs.conf # PATCH-FIX-OPENSUSE Patch1: 0001-Revert-Bump-version.patch +# PATCH-FIX-UPSTREAM +Patch2: 0001-Client-Avoid-processing-of-events-when-showing-windo.patch BuildRequires: fdupes -BuildRequires: libqt5-qtbase-private-headers-devel >= %{version} -BuildRequires: libqt5-qtdeclarative-private-headers-devel >= %{version} +BuildRequires: libqt5-qtbase-private-headers-devel >= %{real_version} +BuildRequires: libqt5-qtdeclarative-private-headers-devel >= %{real_version} BuildRequires: pkgconfig BuildRequires: xz BuildRequires: pkgconfig(egl) ++++++ 0001-Client-Avoid-processing-of-events-when-showing-windo.patch ++++++ >From 68e9002161e2d0e3f33258887541de7abf4c507f Mon Sep 17 00:00:00 2001 From: David Edmundson <davidedmund...@kde.org> Date: Sun, 14 Nov 2021 13:54:19 +0000 Subject: [PATCH] Client: Avoid processing of events when showing windows The only time we want to dispatch events from the wayland socket is when the application is waiting for external events. Doing so at any other time will cause unpredictable behavior in client code. This caused a crash downstream where we had outputs get altered whilst itterating through outputs, which shouldn't happen. There is no benefit to flushing here, it won't make anything appear faster as we haven't attached the buffer yet. Change-Id: Ie13eae4012dab96a93d8810f468d1343402b8c28 Reviewed-by: Qt CI Bot <qt_ci_...@qt-project.org> Reviewed-by: Aleix Pol Gonzalez <aleix...@kde.org> (cherry picked from commit 46ed85a80b28d519cf5887bbdce55d1bf57886c3) --- src/client/qwaylandwindow.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index ba881cb3..1597f67e 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -436,7 +436,6 @@ void QWaylandWindow::setVisible(bool visible) if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip) activePopups << this; initWindow(); - mDisplay->flushRequests(); setGeometry(windowGeometry()); // Don't flush the events here, or else the newly visible window may start drawing, but since -- 2.33.1 ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.hWF92G/_old 2021-12-21 18:40:22.805860294 +0100 +++ /var/tmp/diff_new_pack.hWF92G/_new 2021-12-21 18:40:22.809860297 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://invent.kde.org/qt/qt/qtwayland.git</param> - <param name="changesrevision">02f9585ca19c17ae0978b864195533dc527d825e</param></service></servicedata> + <param name="changesrevision">eb422ab5e07498a7a8d086f6a942ee35ab3c9776</param></service></servicedata> (No newline at EOF) ++++++ qtwayland-everywhere-src-5.15.2+kde34.obscpio -> qtwayland-everywhere-src-5.15.2+kde37.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/client/qwaylanddisplay.cpp new/qtwayland-everywhere-src-5.15.2+kde37/src/client/qwaylanddisplay.cpp --- old/qtwayland-everywhere-src-5.15.2+kde34/src/client/qwaylanddisplay.cpp 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/client/qwaylanddisplay.cpp 2021-12-09 17:38:43.000000000 +0100 @@ -575,14 +575,10 @@ if (mLastKeyboardFocus == keyboardFocus) return; - if (mWaylandIntegration->mShellIntegration) { - mWaylandIntegration->mShellIntegration->handleKeyboardFocusChanged(keyboardFocus, mLastKeyboardFocus); - } else { - if (keyboardFocus) - handleWindowActivated(keyboardFocus); - if (mLastKeyboardFocus) - handleWindowDeactivated(mLastKeyboardFocus); - } + if (keyboardFocus) + handleWindowActivated(keyboardFocus); + if (mLastKeyboardFocus) + handleWindowDeactivated(mLastKeyboardFocus); mLastKeyboardFocus = keyboardFocus; } @@ -601,6 +597,19 @@ QWindow *activeWindow = mActiveWindows.empty() ? nullptr : mActiveWindows.last()->window(); if (activeWindow != QGuiApplication::focusWindow()) QWindowSystemInterface::handleWindowActivated(activeWindow); + + if (!activeWindow) { + if (lastInputDevice()) { +#if QT_CONFIG(clipboard) + if (auto *dataDevice = lastInputDevice()->dataDevice()) + dataDevice->invalidateSelectionOffer(); +#endif +#if QT_CONFIG(wayland_client_primary_selection) + if (auto *device = lastInputDevice()->primarySelectionDevice()) + device->invalidateSelectionOffer(); +#endif + } + } } const wl_callback_listener QWaylandDisplay::syncCallbackListener = { @@ -627,6 +636,13 @@ return mInputDevices.isEmpty() ? 0 : mInputDevices.first(); } +bool QWaylandDisplay::isKeyboardAvailable() const +{ + return std::any_of( + mInputDevices.constBegin(), mInputDevices.constEnd(), + [this](const QWaylandInputDevice *device) { return device->keyboard() != nullptr; }); +} + #if QT_CONFIG(cursor) QWaylandCursor *QWaylandDisplay::waylandCursor() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/client/qwaylanddisplay_p.h new/qtwayland-everywhere-src-5.15.2+kde37/src/client/qwaylanddisplay_p.h --- old/qtwayland-everywhere-src-5.15.2+kde34/src/client/qwaylanddisplay_p.h 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/client/qwaylanddisplay_p.h 2021-12-09 17:38:43.000000000 +0100 @@ -215,6 +215,7 @@ void destroyFrameQueue(const FrameQueue &q); void dispatchQueueWhile(wl_event_queue *queue, std::function<bool()> condition, int timeout = -1); + bool isKeyboardAvailable() const; public slots: void blockingReadEvents(); void flushRequests(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/client/qwaylandinputdevice.cpp new/qtwayland-everywhere-src-5.15.2+kde37/src/client/qwaylandinputdevice.cpp --- old/qtwayland-everywhere-src-5.15.2+kde34/src/client/qwaylandinputdevice.cpp 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/client/qwaylandinputdevice.cpp 2021-12-09 17:38:43.000000000 +0100 @@ -1300,14 +1300,6 @@ void QWaylandInputDevice::Keyboard::handleFocusLost() { mFocus = nullptr; -#if QT_CONFIG(clipboard) - if (auto *dataDevice = mParent->dataDevice()) - dataDevice->invalidateSelectionOffer(); -#endif -#if QT_CONFIG(wayland_client_primary_selection) - if (auto *device = mParent->primarySelectionDevice()) - device->invalidateSelectionOffer(); -#endif mParent->mQDisplay->handleKeyboardFocusChanged(mParent); mRepeatTimer.stop(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/client/qwaylandwindow.cpp new/qtwayland-everywhere-src-5.15.2+kde37/src/client/qwaylandwindow.cpp --- old/qtwayland-everywhere-src-5.15.2+kde34/src/client/qwaylandwindow.cpp 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/client/qwaylandwindow.cpp 2021-12-09 17:38:43.000000000 +0100 @@ -96,7 +96,6 @@ QWaylandWindow::~QWaylandWindow() { mDisplay->destroyFrameQueue(mFrameQueue); - mDisplay->handleWindowDestroyed(this); delete mWindowDecoration; @@ -266,6 +265,8 @@ mMask = QRegion(); mQueuedBuffer = nullptr; + + mDisplay->handleWindowDestroyed(this); } QWaylandWindow *QWaylandWindow::fromWlSurface(::wl_surface *surface) @@ -1083,10 +1084,18 @@ return true; } +Qt::WindowStates QWaylandWindow::windowStates() const +{ + return mLastReportedWindowStates; +} + void QWaylandWindow::handleWindowStatesChanged(Qt::WindowStates states) { createDecoration(); - QWindowSystemInterface::handleWindowStateChanged(window(), states, mLastReportedWindowStates); + Qt::WindowStates statesWithoutActive = states & ~Qt::WindowActive; + Qt::WindowStates lastStatesWithoutActive = mLastReportedWindowStates & ~Qt::WindowActive; + QWindowSystemInterface::handleWindowStateChanged(window(), statesWithoutActive, + lastStatesWithoutActive); mLastReportedWindowStates = states; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/client/qwaylandwindow_p.h new/qtwayland-everywhere-src-5.15.2+kde37/src/client/qwaylandwindow_p.h --- old/qtwayland-everywhere-src-5.15.2+kde34/src/client/qwaylandwindow_p.h 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/client/qwaylandwindow_p.h 2021-12-09 17:38:43.000000000 +0100 @@ -148,6 +148,7 @@ void setWindowState(Qt::WindowStates states) override; void setWindowFlags(Qt::WindowFlags flags) override; void handleWindowStatesChanged(Qt::WindowStates states); + Qt::WindowStates windowStates() const; void raise() override; void lower() override; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/client/shellintegration/qwaylandshellintegration_p.h new/qtwayland-everywhere-src-5.15.2+kde37/src/client/shellintegration/qwaylandshellintegration_p.h --- old/qtwayland-everywhere-src-5.15.2+kde34/src/client/shellintegration/qwaylandshellintegration_p.h 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/client/shellintegration/qwaylandshellintegration_p.h 2021-12-09 17:38:43.000000000 +0100 @@ -73,11 +73,10 @@ return true; } virtual QWaylandShellSurface *createShellSurface(QWaylandWindow *window) = 0; + // kept for binary compat with layer-shell-qt virtual void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) { - if (newFocus) - m_display->handleWindowActivated(newFocus); - if (oldFocus) - m_display->handleWindowDeactivated(oldFocus); + Q_UNUSED(newFocus); + Q_UNUSED(oldFocus); } virtual void *nativeResourceForWindow(const QByteArray &resource, QWindow *window) { Q_UNUSED(resource); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp new/qtwayland-everywhere-src-5.15.2+kde37/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp --- old/qtwayland-everywhere-src-5.15.2+kde34/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp 2021-12-09 17:38:43.000000000 +0100 @@ -407,6 +407,7 @@ { delete m_blitter; m_blitter = nullptr; + eglDestroyContext(m_eglDisplay, m_context); if (m_decorationsContext != EGL_NO_CONTEXT) eglDestroyContext(m_eglDisplay, m_decorationsContext); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp --- old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp 2021-12-09 17:38:43.000000000 +0100 @@ -67,11 +67,6 @@ QWaylandXdgSurface::Toplevel::~Toplevel() { - if (m_applied.states & Qt::WindowActive) { - QWaylandWindow *window = m_xdgSurface->window(); - window->display()->handleWindowDeactivated(window); - } - // The protocol spec requires that the decoration object is deleted before xdg_toplevel. delete m_decoration; m_decoration = nullptr; @@ -85,16 +80,15 @@ if (!(m_applied.states & (Qt::WindowMaximized|Qt::WindowFullScreen))) m_normalSize = m_xdgSurface->m_window->windowFrameGeometry().size(); - if ((m_pending.states & Qt::WindowActive) && !(m_applied.states & Qt::WindowActive)) + if ((m_pending.states & Qt::WindowActive) && !(m_applied.states & Qt::WindowActive) + && !m_xdgSurface->m_window->display()->isKeyboardAvailable()) m_xdgSurface->m_window->display()->handleWindowActivated(m_xdgSurface->m_window); - if (!(m_pending.states & Qt::WindowActive) && (m_applied.states & Qt::WindowActive)) + if (!(m_pending.states & Qt::WindowActive) && (m_applied.states & Qt::WindowActive) + && !m_xdgSurface->m_window->display()->isKeyboardAvailable()) m_xdgSurface->m_window->display()->handleWindowDeactivated(m_xdgSurface->m_window); - // TODO: none of the other plugins send WindowActive either, but is it on purpose? - Qt::WindowStates statesWithoutActive = m_pending.states & ~Qt::WindowActive; - - m_xdgSurface->m_window->handleWindowStatesChanged(statesWithoutActive); + m_xdgSurface->m_window->handleWindowStatesChanged(m_pending.states); if (m_pending.size.isEmpty()) { // An empty size in the configure means it's up to the client to choose the size diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp --- old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp 2021-12-09 17:38:43.000000000 +0100 @@ -69,20 +69,6 @@ return m_xdgShell->getXdgSurface(window); } -void QWaylandXdgShellIntegration::handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) -{ - if (newFocus) { - auto *xdgSurface = qobject_cast<QWaylandXdgSurface *>(newFocus->shellSurface()); - if (xdgSurface && !xdgSurface->handlesActiveState()) - m_display->handleWindowActivated(newFocus); - } - if (oldFocus && qobject_cast<QWaylandXdgSurface *>(oldFocus->shellSurface())) { - auto *xdgSurface = qobject_cast<QWaylandXdgSurface *>(oldFocus->shellSurface()); - if (xdgSurface && !xdgSurface->handlesActiveState()) - m_display->handleWindowDeactivated(oldFocus); - } -} - } QT_END_NAMESPACE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h --- old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h 2021-12-09 17:38:43.000000000 +0100 @@ -65,7 +65,6 @@ QWaylandXdgShellIntegration() {} bool initialize(QWaylandDisplay *display) override; QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override; - void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) override; private: QScopedPointer<QWaylandXdgShell> m_xdgShell; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp --- old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp 2021-12-09 17:38:43.000000000 +0100 @@ -85,13 +85,6 @@ return m_xdgShell->createXdgSurface(window); } -void QWaylandXdgShellV5Integration::handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) { - if (newFocus && qobject_cast<QWaylandXdgPopupV5 *>(newFocus->shellSurface())) - m_display->handleWindowActivated(newFocus); - if (oldFocus && qobject_cast<QWaylandXdgPopupV5 *>(oldFocus->shellSurface())) - m_display->handleWindowDeactivated(oldFocus); -} - } QT_END_NAMESPACE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration_p.h new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration_p.h --- old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration_p.h 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration_p.h 2021-12-09 17:38:43.000000000 +0100 @@ -67,7 +67,6 @@ QWaylandXdgShellV5Integration() {} bool initialize(QWaylandDisplay *display) override; QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override; - void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) override; private: QScopedPointer<QWaylandXdgShellV5> m_xdgShell; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration.cpp new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration.cpp --- old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration.cpp 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration.cpp 2021-12-09 17:38:43.000000000 +0100 @@ -68,20 +68,6 @@ return m_xdgShell->getXdgSurface(window); } -void QWaylandXdgShellV6Integration::handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) -{ - if (newFocus) { - auto *xdgSurface = qobject_cast<QWaylandXdgSurfaceV6 *>(newFocus->shellSurface()); - if (xdgSurface && !xdgSurface->handlesActiveState()) - m_display->handleWindowActivated(newFocus); - } - if (oldFocus && qobject_cast<QWaylandXdgSurfaceV6 *>(oldFocus->shellSurface())) { - auto *xdgSurface = qobject_cast<QWaylandXdgSurfaceV6 *>(oldFocus->shellSurface()); - if (xdgSurface && !xdgSurface->handlesActiveState()) - m_display->handleWindowDeactivated(oldFocus); - } -} - } QT_END_NAMESPACE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration_p.h new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration_p.h --- old/qtwayland-everywhere-src-5.15.2+kde34/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration_p.h 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration_p.h 2021-12-09 17:38:43.000000000 +0100 @@ -65,7 +65,6 @@ QWaylandXdgShellV6Integration() {} bool initialize(QWaylandDisplay *display) override; QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override; - void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) override; private: QScopedPointer<QWaylandXdgShellV6> m_xdgShell; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwayland-everywhere-src-5.15.2+kde34/tests/auto/client/xdgshell/tst_xdgshell.cpp new/qtwayland-everywhere-src-5.15.2+kde37/tests/auto/client/xdgshell/tst_xdgshell.cpp --- old/qtwayland-everywhere-src-5.15.2+kde34/tests/auto/client/xdgshell/tst_xdgshell.cpp 2021-10-15 18:55:33.000000000 +0200 +++ new/qtwayland-everywhere-src-5.15.2+kde37/tests/auto/client/xdgshell/tst_xdgshell.cpp 2021-12-09 17:38:43.000000000 +0100 @@ -31,6 +31,7 @@ #include <QtGui/QOpenGLWindow> #include <QtGui/qpa/qplatformnativeinterface.h> #include <QtWaylandClient/private/wayland-wayland-client-protocol.h> +#include <QtWaylandClient/private/qwaylandwindow_p.h> using namespace MockCompositor; @@ -155,9 +156,12 @@ // Toplevel windows don't know their position on xdg-shell // QCOMPARE(window.frameGeometry().topLeft(), QPoint()); // TODO: this doesn't currently work when window decorations are enabled -// QEXPECT_FAIL("", "configure has already been acked, we shouldn't have to wait for isActive", Continue); -// QVERIFY(window.isActive()); - QTRY_VERIFY(window.isActive()); // Just make sure it eventually get's set correctly + // window.windowstate() is driven by keyboard focus, however for decorations we want to follow + // XDGShell this is internal to QtWayland so it is queried directly + auto waylandWindow = static_cast<QtWaylandClient::QWaylandWindow *>(window.handle()); + Q_ASSERT(waylandWindow); + QTRY_VERIFY(waylandWindow->windowStates().testFlag( + Qt::WindowActive)); // Just make sure it eventually get's set correctly const QSize screenSize(640, 480); const uint maximizedSerial = exec([=] { ++++++ qtwayland-everywhere-src.obsinfo ++++++ --- /var/tmp/diff_new_pack.hWF92G/_old 2021-12-21 18:40:23.105860563 +0100 +++ /var/tmp/diff_new_pack.hWF92G/_new 2021-12-21 18:40:23.109860567 +0100 @@ -1,6 +1,6 @@ name: qtwayland-everywhere-src -version: 5.15.2+kde34 -mtime: 1634316933 -commit: 02f9585ca19c17ae0978b864195533dc527d825e +version: 5.15.2+kde37 +mtime: 1639067923 +commit: eb422ab5e07498a7a8d086f6a942ee35ab3c9776