From e84724d89a266d0431100ee6cbd5f8e9bc29c1b318167c6a4be5649bbc8c8033 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 12 Jul 2018 07:17:30 +0000 Subject: [PATCH] Accepting request 622055 from KDE:Qt5 - Remove patch as it causes a regression with resizing windows: * 0001-Handle-maximize-minimize-fullscreen-xdgshellv6.patch OBS-URL: https://build.opensuse.org/request/show/622055 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtwayland?expand=0&rev=22 --- ...imize-minimize-fullscreen-xdgshellv6.patch | 145 ------------------ libqt5-qtwayland.changes | 6 + libqt5-qtwayland.spec | 2 - 3 files changed, 6 insertions(+), 147 deletions(-) delete mode 100644 0001-Handle-maximize-minimize-fullscreen-xdgshellv6.patch diff --git a/0001-Handle-maximize-minimize-fullscreen-xdgshellv6.patch b/0001-Handle-maximize-minimize-fullscreen-xdgshellv6.patch deleted file mode 100644 index 6802467..0000000 --- a/0001-Handle-maximize-minimize-fullscreen-xdgshellv6.patch +++ /dev/null @@ -1,145 +0,0 @@ -From da43d51dcbafc5fa1db245efd6737aa54c245afb Mon Sep 17 00:00:00 2001 -From: Giulio Camuffo -Date: Sat, 1 Jul 2017 09:53:07 +0200 -Subject: [PATCH] Handle maximize/minimize/fullscreen in xdg_shell_v6 - -Change-Id: I385eb3279d91f1c38d2f5d46bc63b324f0456ca4 ---- - src/client/qwaylandwindow.cpp | 6 +++- - src/client/qwaylandxdgshellv6.cpp | 61 ++++++++++++++++++++++++++++++++++++--- - src/client/qwaylandxdgshellv6_p.h | 8 ++++- - 3 files changed, 69 insertions(+), 6 deletions(-) - -Index: qtwayland-everywhere-src-5.11.0-beta2/src/client/qwaylandwindow.cpp -=================================================================== ---- qtwayland-everywhere-src-5.11.0-beta2.orig/src/client/qwaylandwindow.cpp -+++ qtwayland-everywhere-src-5.11.0-beta2/src/client/qwaylandwindow.cpp -@@ -980,7 +980,11 @@ bool QWaylandWindow::setWindowStateInter - // As of february 2013 QWindow::setWindowState sets the new state value after - // QPlatformWindow::setWindowState returns, so we cannot rely on QWindow::windowState - // here. We use then this mState variable. -- mState = state; -+ // NOTE: The compositor does not tell us when the window is not minimized anymore, -+ // so we store the state except for the WindowMinimized value, to make sure that -+ // the equality check above does not return true when setWindowState(Qt::WindowMinimized) -+ // is called, even though the window is actually not minimized anymore. -+ mState = state & ~Qt::WindowMinimized; - - if (mShellSurface) { - createDecoration(); -Index: qtwayland-everywhere-src-5.11.0-beta2/src/client/qwaylandxdgshellv6.cpp -=================================================================== ---- qtwayland-everywhere-src-5.11.0-beta2.orig/src/client/qwaylandxdgshellv6.cpp -+++ qtwayland-everywhere-src-5.11.0-beta2/src/client/qwaylandxdgshellv6.cpp -@@ -56,6 +56,8 @@ QWaylandXdgSurfaceV6::Toplevel::Toplevel - : QtWayland::zxdg_toplevel_v6(xdgSurface->get_toplevel()) - , m_xdgSurface(xdgSurface) - { -+ m_configureState.fullscreen = false; -+ m_configureState.maximized = false; - } - - QWaylandXdgSurfaceV6::Toplevel::~Toplevel() -@@ -75,13 +77,35 @@ void QWaylandXdgSurfaceV6::Toplevel::zxd - m_configureState.width = width; - m_configureState.height = height; - -+ bool wasMaximized = m_configureState.maximized; -+ bool wasFullscreen = m_configureState.fullscreen; -+ - uint32_t *state = reinterpret_cast(states->data); - size_t numStates = states->size / sizeof(uint32_t); -- m_configureState.states.reserve(numStates); -- m_configureState.states.clear(); - -- for (size_t i = 0; i < numStates; i++) -- m_configureState.states << state[i]; -+ m_configureState.fullscreen = false; -+ m_configureState.maximized = false; -+ -+ for (size_t i = 0; i < numStates; i++) { -+ switch (state[i]) { -+ case ZXDG_TOPLEVEL_V6_STATE_MAXIMIZED: -+ m_configureState.maximized = true; -+ break; -+ case ZXDG_TOPLEVEL_V6_STATE_FULLSCREEN: -+ m_configureState.fullscreen = true; -+ break; -+ default: -+ break; -+ } -+ } -+ -+ if ((!wasMaximized && m_configureState.maximized) || (!wasFullscreen && m_configureState.fullscreen)) -+ m_normalSize = m_xdgSurface->m_window->window()->frameGeometry().size(); -+ -+ if ((width == 0 || height == 0) && !m_normalSize.isEmpty()) { -+ m_configureState.width = m_normalSize.width(); -+ m_configureState.height = m_normalSize.height(); -+ } - } - - void QWaylandXdgSurfaceV6::Toplevel::zxdg_toplevel_v6_close() -@@ -232,6 +256,35 @@ void QWaylandXdgSurfaceV6::zxdg_surface_ - ack_configure(serial); - } - -+void QWaylandXdgSurfaceV6::setMaximized() -+{ -+ if (m_toplevel) -+ m_toplevel->set_maximized(); -+} -+ -+void QWaylandXdgSurfaceV6::setFullscreen() -+{ -+ if (m_toplevel) -+ m_toplevel->set_fullscreen(nullptr); -+} -+ -+void QWaylandXdgSurfaceV6::setNormal() -+{ -+ if (!m_toplevel) -+ return; -+ -+ if (m_toplevel->m_configureState.maximized) -+ m_toplevel->unset_maximized(); -+ if (m_toplevel->m_configureState.fullscreen) -+ m_toplevel->unset_fullscreen(); -+} -+ -+void QWaylandXdgSurfaceV6::setMinimized() -+{ -+ if (m_toplevel) -+ m_toplevel->set_minimized(); -+} -+ - - - QWaylandXdgShellV6::QWaylandXdgShellV6(struct ::wl_registry *registry, uint32_t id, uint32_t availableVersion) -Index: qtwayland-everywhere-src-5.11.0-beta2/src/client/qwaylandxdgshellv6_p.h -=================================================================== ---- qtwayland-everywhere-src-5.11.0-beta2.orig/src/client/qwaylandxdgshellv6_p.h -+++ qtwayland-everywhere-src-5.11.0-beta2/src/client/qwaylandxdgshellv6_p.h -@@ -88,6 +88,10 @@ public: - - protected: - void zxdg_surface_v6_configure(uint32_t serial) override; -+ void setMaximized() override; -+ void setFullscreen() override; -+ void setNormal() override; -+ void setMinimized() override; - - private: - class Toplevel: public QtWayland::zxdg_toplevel_v6 -@@ -103,8 +107,10 @@ private: - - struct { - int32_t width, height; -- QVarLengthArray states; -+ bool maximized; -+ bool fullscreen; - } m_configureState; -+ QSize m_normalSize; - - QWaylandXdgSurfaceV6 *m_xdgSurface = nullptr; - }; diff --git a/libqt5-qtwayland.changes b/libqt5-qtwayland.changes index 487a931..3eb96d3 100644 --- a/libqt5-qtwayland.changes +++ b/libqt5-qtwayland.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Jul 7 12:30:44 UTC 2018 - fabian@ritter-vogt.de + +- Remove patch as it causes a regression with resizing windows: + * 0001-Handle-maximize-minimize-fullscreen-xdgshellv6.patch + ------------------------------------------------------------------- Tue Jun 19 10:51:25 CEST 2018 - fabian@ritter-vogt.de diff --git a/libqt5-qtwayland.spec b/libqt5-qtwayland.spec index a9e2e8d..2fd189c 100644 --- a/libqt5-qtwayland.spec +++ b/libqt5-qtwayland.spec @@ -33,8 +33,6 @@ Source: https://download.qt.io/official_releases/qt/5.11/%{real_version} Source1: baselibs.conf # PATCH-FIX-OPENSUSE Patch1: workaround-null-object.patch -# Pending for upstream 5.9 (https://codereview.qt-project.org/#/c/199123/) -Patch1501: 0001-Handle-maximize-minimize-fullscreen-xdgshellv6.patch BuildRequires: fdupes BuildRequires: libqt5-qtbase-private-headers-devel >= %{version} BuildRequires: libqt5-qtdeclarative-private-headers-devel >= %{version}