diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-08-02 19:14:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-08-02 19:14:55 +0100 |
commit | b24bd25253fe093f722ab576d29fdc41d04cb1ee (patch) | |
tree | 0fcf2afd9f852c4d4c291cf8afaa2c244d598105 /dev-qt | |
parent | 121ed4eec41fbf03e1998d09eede1bf449da63b9 (diff) |
gentoo resync : 02.08.2019
Diffstat (limited to 'dev-qt')
17 files changed, 505 insertions, 6 deletions
diff --git a/dev-qt/Manifest.gz b/dev-qt/Manifest.gz Binary files differindex 691f0f544d54..3ef9a59093e8 100644 --- a/dev-qt/Manifest.gz +++ b/dev-qt/Manifest.gz diff --git a/dev-qt/qtgui/Manifest b/dev-qt/qtgui/Manifest index 89c6a57bef5a..5a0ed7a03936 100644 --- a/dev-qt/qtgui/Manifest +++ b/dev-qt/qtgui/Manifest @@ -3,5 +3,5 @@ AUX qtgui-5.12.4-fix-highdpi-crash.patch 1401 BLAKE2B 7782acee3e85669d4bc5c7deef DIST qtbase-everywhere-src-5.12.3.tar.xz 48382148 BLAKE2B 779c43a75403e0f21357a90228bbcc3f216495613f4f17a2f442c7aa93f277a79cc7addf5ae44e22964069580f4932cfd14ba4773aa0ab30405d5587577a545c SHA512 1dab927573eb22b1ae772de3a418f7d3999ea78d6e667a7f2494390dd1f0981ea93f4f892cb6e124ac18812c780ee71da3021b485c61eaf1ef2234a5c12b7fe2 DIST qtbase-everywhere-src-5.12.4.tar.xz 48431020 BLAKE2B 7eeb3f6698984343ec14d03b8ad66ab23d81cd7a25c590316f7300c868ab869a9c96b125d56bba149ee116dff44bf47c751cce06f2cdd2d3121e5448708c5f6b SHA512 28b029a0d3621477f625d474b8bc38ddcc7173df6adb274b438e290b6c50bd0891e5b62c04b566a281781acee3a353a6a3b0bc88228e996994f92900448d7946 EBUILD qtgui-5.12.3-r1.ebuild 3719 BLAKE2B 6d8b24192afbda0c9f4955ef6127fa1b334cdfde00a8e78c9eeffc52496d0a8801642c21bc8dd730ed67373c32f738d4f804e6cc3a5901b38360eb39d15caf27 SHA512 5ad5f7b427fb989f0f3bbed475932808d7b598b53d9e16bd25bbb57ec75127c6ccc42295e26446be29516a881bd42989936c665ef48af2ff2c984d617aeb4a16 -EBUILD qtgui-5.12.4.ebuild 3820 BLAKE2B f6584987f2e6744c4f950436c6a63a1d5496025c75ca3062a9e826aea0d1b6e7da6af1afec62cc2f60b282eb2b1455cfc8fc68cd73b1e49d91faf9a81889c22b SHA512 d72c3ab474e749fdf17c711d6e79cea19f55cb88ed22938dfa11eb1ab4bb15d987e856a1c39790eaef955536e2d776eb99b8270a582e6d8b0e3cbf883d5d4874 -MISC metadata.xml 1200 BLAKE2B 272e152cc1a9d596407c3d687fbb7b9f7b1b553cbf07e78e649031a427782f3377d3ee71d40e472b6f5978a8c1e9c2bfb9c0669edebcfcd1605d27973ba0ba1b SHA512 5ed40f7fdc6e289bd23bc5d4ce54794e58acf8c14863c45fe228d29c555e3afff84ee5b73f6f9e6be8b43e2ca28a96e4a73c22129ed2099262b5f682bf8b3aa6 +EBUILD qtgui-5.12.4.ebuild 3866 BLAKE2B ad2901c3c6d701c11fce868f9a82e9f986b26fac54bd89a7b4727f0195ae2e881b5f2daa79f3fc433864d6de2daed9fed18aa58acbe9686b4ea523234bb801a1 SHA512 03c883fe4d9f8941b8274d08898ee9d0711719025d16550ed4b00a21e85000ec7edf14e805ad62fbb869a2b942ace5d0932af990128218390ae53954ebd40774 +MISC metadata.xml 1322 BLAKE2B b6161b568e3a4c34a8fce62a8cce9e1bd7cabbc0d2d2baa0e5e41295974b877d59adff4983b731bb359040f3662999a7915a1527bedeca9de09eb702541d1ae7 SHA512 dcfcdc8f5622e5d6b8488f07b6de62aae829b564ecdb9fb8b9f273bc2593c312f5265849bb3d2175d0ab468977ac2afb8099519cfb66224d8e5df0efec01ae4a diff --git a/dev-qt/qtgui/metadata.xml b/dev-qt/qtgui/metadata.xml index bb8d780f9c2d..74256c169f9b 100644 --- a/dev-qt/qtgui/metadata.xml +++ b/dev-qt/qtgui/metadata.xml @@ -14,6 +14,7 @@ <flag name="libinput">Enable support for input devices via <pkg>dev-libs/libinput</pkg></flag> <flag name="tslib">Enable support for touchscreen devices via <pkg>x11-libs/tslib</pkg></flag> <flag name="tuio">Build plugin to receive touch events over the TUIO protocol</flag> + <flag name="wayland">Provide <pkg>dev-qt/qtwayland</pkg> to ensure Qt applications can be run as Wayland clients</flag> <flag name="xcb">Build the XCB platform plugin and enable X11 integration</flag> </use> <upstream> diff --git a/dev-qt/qtgui/qtgui-5.12.4.ebuild b/dev-qt/qtgui/qtgui-5.12.4.ebuild index 31b4a4ca658f..81db316f4805 100644 --- a/dev-qt/qtgui/qtgui-5.12.4.ebuild +++ b/dev-qt/qtgui/qtgui-5.12.4.ebuild @@ -14,7 +14,7 @@ fi # TODO: linuxfb IUSE="accessibility dbus egl eglfs evdev +gif gles2 ibus - jpeg +libinput +png tslib tuio +udev vnc +xcb" + jpeg +libinput +png tslib tuio +udev vnc wayland +xcb" REQUIRED_USE=" || ( eglfs xcb ) accessibility? ( dbus xcb ) @@ -69,6 +69,7 @@ DEPEND="${RDEPEND} " PDEPEND=" ibus? ( app-i18n/ibus ) + wayland? ( ~dev-qt/qtwayland-${PV} ) " QT5_TARGET_SUBDIRS=( diff --git a/dev-qt/qtsql/Manifest b/dev-qt/qtsql/Manifest index 28028486c906..44b9caf52adc 100644 --- a/dev-qt/qtsql/Manifest +++ b/dev-qt/qtsql/Manifest @@ -1,5 +1,6 @@ +AUX qtsql-5.12.4-mysql_free_results_when_qsqlquery_finished_is_called.patch 1436 BLAKE2B 24fa12fb72f862f8f8cba401bf773b91c74dd9b0af7a7801ee3b2298ff5176981833ffbf47b4d565bd0cfd71bff9735689ce4c5dd67ea6349458af78e37dcf3c SHA512 ea8fc7333dfd966d8b850b46f83906daa508d51294e8cba19553520f0583864c86f5319627c31cb633d2dc3ef22ad1873801b780da28ee786ae3bb91a10e478e DIST qtbase-everywhere-src-5.12.3.tar.xz 48382148 BLAKE2B 779c43a75403e0f21357a90228bbcc3f216495613f4f17a2f442c7aa93f277a79cc7addf5ae44e22964069580f4932cfd14ba4773aa0ab30405d5587577a545c SHA512 1dab927573eb22b1ae772de3a418f7d3999ea78d6e667a7f2494390dd1f0981ea93f4f892cb6e124ac18812c780ee71da3021b485c61eaf1ef2234a5c12b7fe2 DIST qtbase-everywhere-src-5.12.4.tar.xz 48431020 BLAKE2B 7eeb3f6698984343ec14d03b8ad66ab23d81cd7a25c590316f7300c868ab869a9c96b125d56bba149ee116dff44bf47c751cce06f2cdd2d3121e5448708c5f6b SHA512 28b029a0d3621477f625d474b8bc38ddcc7173df6adb274b438e290b6c50bd0891e5b62c04b566a281781acee3a353a6a3b0bc88228e996994f92900448d7946 EBUILD qtsql-5.12.3.ebuild 1248 BLAKE2B 5e882a4eef1c1642aed15d9c56cf2947a81ecc23434d9553d193efde1c9bf0b6f0bc88879a844d889003bbd6d0a4051fe50318feb398d2a12a01072206bc2296 SHA512 57fb3698b7a451206507f7d43358c3e2e3a1ca92a07b7000781be7bdbdecef395a0088b979a3599ef56ed95df3b55c484644fd1772d4b500e7fc4144d2937b8b -EBUILD qtsql-5.12.4.ebuild 1254 BLAKE2B 614f00cb5d8d9c8a9a42340e6c01f3ee684527f5a5b3336fa5666adad630a51bc39889820592f0f104c00304d3bef75e23ac536760a369226636b95c94e97283 SHA512 342c4dff5f1f6ed4a2b5824213427c5f4a2c310bd1a16a933d2cd1ab1eca9a5d03d442a5569b19915a3cb32f733a645adf0f946b6fb306e1a5be7654e5aa1615 +EBUILD qtsql-5.12.4-r1.ebuild 1375 BLAKE2B b9d86e57a064211b7a4ed9a66490c10c1bcd2f89c9fb42e52c9221a345de372db00059cbc13691f5dc6661b8194032353011e5b9fb08f424e753407c9de4aa08 SHA512 fbbd9791fafa46ffa51e981b6e1c61f4a25c319e9dfdb07fcf97851049fccb792dd629fd944f939ac475e1c10fa18cccd99dcb54f094bbfacea4526b0ea818a6 MISC metadata.xml 481 BLAKE2B 210b94f2e7cdb09b2e07ec4a931ea47d5aed734be52e9dcb132ae174fc0707ebd82feff52e44490c7133274c4dd31b0898f9fa54ce700b635b6a45c2cbf2b5c6 SHA512 bc22732d392630b21ba3895b22a3b1835fe639f930bad0ebab511757df89ebbb30530f0c482ff0a7eb24c7ba844f0b2448040dc5252ac98b0ac01423f236829f diff --git a/dev-qt/qtsql/files/qtsql-5.12.4-mysql_free_results_when_qsqlquery_finished_is_called.patch b/dev-qt/qtsql/files/qtsql-5.12.4-mysql_free_results_when_qsqlquery_finished_is_called.patch new file mode 100644 index 000000000000..6bd3d3d2b9bd --- /dev/null +++ b/dev-qt/qtsql/files/qtsql-5.12.4-mysql_free_results_when_qsqlquery_finished_is_called.patch @@ -0,0 +1,43 @@ +From 97d8be10cd97cf997286ed0ca0a5d8b360fa942e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <dvratil@kde.org> +Date: Sat, 1 Dec 2018 17:56:41 +0100 +Subject: [PATCH] MySQL: Free the results when QSqlQuery::finished() is called + +Calling mysql_stmt_free_result() frees the results of the last +executed query while keeping the prepared statement valid. This +allows one to keep around prepared QSqlQueries without the overhead +of keeping all the results in memory. + +Change-Id: I4589e90857cc4e9a6f9612799bfca967a67e2ab2 +Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> +Reviewed-by: Andy Shaw <andy.shaw@qt.io> +--- + src/plugins/sqldrivers/mysql/qsql_mysql.cpp | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp ++++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp +@@ -197,6 +197,7 @@ protected: + QSqlRecord record() const override; + void virtual_hook(int id, void *data) override; + bool nextResult() override; ++ void detachFromResultSet() override; + + #if MYSQL_VERSION_ID >= 40108 + bool prepare(const QString &stmt) override; +@@ -804,6 +805,15 @@ int QMYSQLResult::numRowsAffected() + return d->rowsAffected; + } + ++void QMYSQLResult::detachFromResultSet() ++{ ++ Q_D(QMYSQLResult); ++ ++ if (d->preparedQuery) { ++ mysql_stmt_free_result(d->stmt); ++ } ++} ++ + QVariant QMYSQLResult::lastInsertId() const + { + Q_D(const QMYSQLResult); diff --git a/dev-qt/qtsql/qtsql-5.12.4.ebuild b/dev-qt/qtsql/qtsql-5.12.4-r1.ebuild index ba9ab526b7ec..d1e4e555dd9c 100644 --- a/dev-qt/qtsql/qtsql-5.12.4.ebuild +++ b/dev-qt/qtsql/qtsql-5.12.4-r1.ebuild @@ -38,6 +38,11 @@ QT5_GENTOO_PRIVATE_CONFIG=( :sql ) +PATCHES+=( + # Backport from dev branch + "${FILESDIR}/${P}-mysql_free_results_when_qsqlquery_finished_is_called.patch" +) + src_configure() { local myconf=( $(qt_use freetds sql-tds plugin) diff --git a/dev-qt/qtwayland/Manifest b/dev-qt/qtwayland/Manifest index b21c6cf8b6ff..3cf0a9c4f4bf 100644 --- a/dev-qt/qtwayland/Manifest +++ b/dev-qt/qtwayland/Manifest @@ -1,5 +1,9 @@ +AUX qtwayland-5.12.4-client-make-handleupdate-aware-of-exposure-changes.patch 2537 BLAKE2B 7301dd0fa703cfcf49f991cbba80b87e7f90019a9ab2aaebfcf8e5f2314c54e32a1276692fcf97b139d0f5b44dc154bc2a46da12722c368208eaeeac7947675e SHA512 ff806e17083e12f585bb83a63717a547ac8a5c546c67a94579726cc32c28a123f6e739eb435895d49b6bdcbb9021989523a64aa30685b5ef605a095d82b02e26 +AUX qtwayland-5.12.4-client-no-fake-surfacecreated-destroyed-events.patch 3715 BLAKE2B 5da05822d6601f5abb660e0c6b94e92a9cdbedf8fdff91be4b7f8c65402aef3b375c72c915864c22d80008d005f2d472ea0ec73c593d67b2c19b4df8d8d03264 SHA512 3b037825ac73499bbdcb09e85e2a23aae4fa8dd41a1bd5b737004e44a4257a6fdc49f80a52ef162fbd1696d109bb4882aaa7c3fd3ac9092f9a3c6b4bcec80e61 +AUX qtwayland-5.12.4-client-reset-frame-callback-timer-when-window-hiding.patch 1344 BLAKE2B 50cfe27837a7a37463f0d2b8bd42392b447074f68b338e2d8e9042a0621da8dcbf9f3878b368cbdd40aa67d7a3307733b7d7d777110494c979d5aa61f5f2383a SHA512 4d1631a3a9ebc32e079e777fb467f65836a108795db766e8c0ca5437a76518b1db14801f2489359187a363e70996728da6ad213c270fb3eb8fc9ee955bef98fd +AUX qtwayland-5.12.4-fix-stuttering-when-gui-thread-busy.patch 5579 BLAKE2B 70113b9f5e9d8bbd0920f1222cd741d906c86f007a6cf3a1c26dcace2f3d277988969fc3e9375271b9b0be340e19e085e5a7210ae92354f185464a82f0b72433 SHA512 4aecb65f51c3c30a3acb92ff3284fe33f1cb73f53130eef1dfe530f152776e873fb4833b950868ad4c7366d2cf22c5fb8d4f7b551925f1cd114f5ad9b44cf19c DIST qtwayland-everywhere-src-5.12.3.tar.xz 432304 BLAKE2B eb2ba520c651467c8ed5f0d870a69c9b07047cb4c05a0c889b36abeab30149861b83ca693efb0bb93dce4f5da5913afc3c8b61933ef0e8307d22b64fce530d87 SHA512 e66f9f41c15cf84165e559a1ff09e20ec21bb3f909b57fab08b0e3f8f9eeacf75d49541b499b1a6514a34d1ba5dd426ec1ce77719910588afa12cb3a7980dc90 DIST qtwayland-everywhere-src-5.12.4.tar.xz 434076 BLAKE2B f034080ec3ad8281c10edcdaa56bf2bcac2ea0002bb2b4780fce40cc28bcf30db713c736916f3382aa7ad0418f5ac424064d675c7001968378487d9cb40c619f SHA512 f3fd6644d7fa21ef042ecda807f6ede7853944de8908f8d390f0ebec258406ff4a4f3bfbb382b57a7a4684e19906b79b43c920f55c5fda75bacfc9a96fafa301 EBUILD qtwayland-5.12.3.ebuild 1137 BLAKE2B 91803151e658e54b23668c5ae4d387a2510d26ae42fb204cd6b5e3fc9649293ea90da44cb4243c0df686d42ba29f5b4875b9c2fc193e87a3e53f9bb1d5373996 SHA512 83d2ae87f67d4937bfbe1d24ac621afe0134c307479660e35aa4a4195b8879b6e891432c7e4a93e8822ea7b44c7a024c6cf38504526dba3ed9d4bcaa33b2ac48 -EBUILD qtwayland-5.12.4.ebuild 1142 BLAKE2B c8c396f29cddee68c7612898769452304f3887c2c8d6037a321156fcf145c9d179eb5fc15bcb0012454a2235cfded99f0fb00ede1b8436ce699c692924b280af SHA512 26335eab9d60c8612d79d4462f3512e9b98607b756be06130fbd9d6c0b3eddb46372bc50fe410f5354d205ca33b73a5b12b1a186f8d1b03960adf1a1a3f02c1e +EBUILD qtwayland-5.12.4-r1.ebuild 1446 BLAKE2B 1b10ce32f1b410c1864d06f0e7fb91d16d65882d7a0241442e6e9610a09cf28660439603062de5a221554970f14f60e8b995e205f8c53d0627041b828221ae05 SHA512 e0e8797eda3ddac09fe0b42560291a72f2c782ccbd720daa9c0e3eaaaace78521d664758b32b1a804319f5b4cb61ad07b786bf211fcf9ff7151e85242afbda74 MISC metadata.xml 593 BLAKE2B a6af5855403e860ee4a4900cef3019fea4552e8c9edc02ada1de5edc467ae9a8f9d86aff6bc656c4154ddb8018c8c8599b75f92d7b766c48e05e56e37999a009 SHA512 2603bc1d30993bf0d0b94784c7dca7c2cd2d15ff5fce4ca4bbdad4b2dc65a8ab7b7bb8cf207649ca4717ca6e4caaa8c75e079db81f0598511a1355c0f325a00d diff --git a/dev-qt/qtwayland/files/qtwayland-5.12.4-client-make-handleupdate-aware-of-exposure-changes.patch b/dev-qt/qtwayland/files/qtwayland-5.12.4-client-make-handleupdate-aware-of-exposure-changes.patch new file mode 100644 index 000000000000..6aacad2a942e --- /dev/null +++ b/dev-qt/qtwayland/files/qtwayland-5.12.4-client-make-handleupdate-aware-of-exposure-changes.patch @@ -0,0 +1,82 @@ +From b13b595dc4f4fe6bdca7b69a21fd934ee233e149 Mon Sep 17 00:00:00 2001 +From: David Edmundson <davidedmundson@kde.org> +Date: Sun, 23 Jun 2019 14:48:30 +0200 +Subject: [PATCH] Client: Make handleUpdate aware of exposure changes + +The wl_surface can be destroyed whilst a render is happening. Calling +wl_surface::frame after the window is reset can crash as wl_surface is +null. + +Change-Id: I139a9b234cb6acba81d6c1d5fa58629904a25053 +--- + src/client/qwaylandwindow.cpp | 10 +++++++++- + src/client/qwaylandwindow_p.h | 4 ++++ + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp +index 5ea0dce1e..7e7a4929c 100644 +--- a/src/client/qwaylandwindow.cpp ++++ b/src/client/qwaylandwindow.cpp +@@ -79,6 +79,8 @@ Q_LOGGING_CATEGORY(lcWaylandBackingstore, "qt.qpa.wayland.backingstore") + + QWaylandWindow *QWaylandWindow::mMouseGrab = nullptr; + ++QReadWriteLock mSurfaceLock; ++ + QWaylandWindow::QWaylandWindow(QWindow *window) + : QPlatformWindow(window) + , mDisplay(waylandScreen()->display()) +@@ -210,6 +212,7 @@ void QWaylandWindow::initWindow() + + void QWaylandWindow::initializeWlSurface() + { ++ QWriteLocker lock(&mSurfaceLock); + init(mDisplay->createSurface(static_cast<QtWayland::wl_surface *>(this))); + } + +@@ -245,8 +248,10 @@ void QWaylandWindow::reset(bool sendDestroyEvent) + mShellSurface = nullptr; + delete mSubSurfaceWindow; + mSubSurfaceWindow = nullptr; +- if (isInitialized()) ++ if (isInitialized()) { ++ QWriteLocker lock(&mSurfaceLock); + destroy(); ++ } + mScreens.clear(); + + if (mFrameCallback) { +@@ -1145,6 +1150,9 @@ void QWaylandWindow::requestUpdate() + void QWaylandWindow::handleUpdate() + { + // TODO: Should sync subsurfaces avoid requesting frame callbacks? ++ QReadLocker lock(&mSurfaceLock); ++ if (!isInitialized()) ++ return; + + if (mFrameCallback) { + wl_callback_destroy(mFrameCallback); +diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h +index e8c9d5684..d3706442f 100644 +--- a/src/client/qwaylandwindow_p.h ++++ b/src/client/qwaylandwindow_p.h +@@ -53,6 +53,8 @@ + + #include <QtCore/QWaitCondition> + #include <QtCore/QMutex> ++#include <QtCore/QReadWriteLock> ++ + #include <QtGui/QIcon> + #include <QtCore/QVariant> + #include <QtCore/QLoggingCategory> +@@ -271,6 +273,8 @@ private: + static QMutex mFrameSyncMutex; + static QWaylandWindow *mMouseGrab; + ++ QReadWriteLock mSurfaceLock; ++ + friend class QWaylandSubSurface; + }; + +-- +2.16.3 diff --git a/dev-qt/qtwayland/files/qtwayland-5.12.4-client-no-fake-surfacecreated-destroyed-events.patch b/dev-qt/qtwayland/files/qtwayland-5.12.4-client-no-fake-surfacecreated-destroyed-events.patch new file mode 100644 index 000000000000..c358e0f72de0 --- /dev/null +++ b/dev-qt/qtwayland/files/qtwayland-5.12.4-client-no-fake-surfacecreated-destroyed-events.patch @@ -0,0 +1,92 @@ +From e6edc73942a76e57e7ac745217092333480f2c64 Mon Sep 17 00:00:00 2001 +From: David Edmundson <davidedmundson@kde.org> +Date: Sun, 23 Jun 2019 15:09:51 +0200 +Subject: [PATCH] Client: Don't send fake SurfaceCreated/Destroyed events + +QPlatformSurface relates to the backing store. Not the wl_surface. +They are emitted by QPlatformWindow. + +Due to a previously incorrect usage by KDE developers it was faked to +emit the events when the wl_surface is created/hidden to keep behavior. + +With QtBase a9246c7132a2c8864d3ae6cebd260bb9ee711fcb this now causes an +issue as now QWidgets react to this event in a breaking way. + +Change-Id: I2f003bc9da85f032a0053677fd281152099fc9eb +--- + .../wayland/custom-extension/client-common/customextension.cpp | 9 +++++++-- + src/client/qwaylandwindow.cpp | 10 ++-------- + src/client/qwaylandwindow_p.h | 2 +- + 3 files changed, 10 insertions(+), 11 deletions(-) + +diff --git a/examples/wayland/custom-extension/client-common/customextension.cpp b/examples/wayland/custom-extension/client-common/customextension.cpp +index aa0cb58a4..16f18fd7a 100644 +--- a/examples/wayland/custom-extension/client-common/customextension.cpp ++++ b/examples/wayland/custom-extension/client-common/customextension.cpp +@@ -81,8 +81,13 @@ QWindow *CustomExtension::windowForSurface(struct ::wl_surface *surface) + + bool CustomExtension::eventFilter(QObject *object, QEvent *event) + { +- if (event->type() == QEvent::PlatformSurface +- && static_cast<QPlatformSurfaceEvent*>(event)->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated) { ++ if (event->type() == QEvent::Expose) { ++ auto ee = static_cast<QExposeEvent*>(event); ++ ++ if ((ee->region().isNull())) { ++ return false; ++ } ++ + QWindow *window = qobject_cast<QWindow*>(object); + Q_ASSERT(window); + window->removeEventFilter(this); +diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp +index ca7c8495c..a6331621d 100644 +--- a/src/client/qwaylandwindow.cpp ++++ b/src/client/qwaylandwindow.cpp +@@ -93,7 +93,7 @@ QWaylandWindow::~QWaylandWindow() + delete mWindowDecoration; + + if (isInitialized()) +- reset(false); ++ reset(); + + const QWindow *parent = window(); + foreach (QWindow *w, QGuiApplication::topLevelWindows()) { +@@ -119,8 +119,6 @@ void QWaylandWindow::initWindow() + + if (!isInitialized()) { + initializeWlSurface(); +- QPlatformSurfaceEvent e(QPlatformSurfaceEvent::SurfaceCreated); +- QGuiApplication::sendEvent(window(), &e); + } + + if (shouldCreateSubSurface()) { +@@ -227,12 +225,8 @@ bool QWaylandWindow::shouldCreateSubSurface() const + return QPlatformWindow::parent() != nullptr; + } + +-void QWaylandWindow::reset(bool sendDestroyEvent) ++void QWaylandWindow::reset() + { +- if (isInitialized() && sendDestroyEvent) { +- QPlatformSurfaceEvent e(QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed); +- QGuiApplication::sendEvent(window(), &e); +- } + delete mShellSurface; + mShellSurface = nullptr; + delete mSubSurfaceWindow; +diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h +index 121ad8219..ba69fd9dc 100644 +--- a/src/client/qwaylandwindow_p.h ++++ b/src/client/qwaylandwindow_p.h +@@ -263,7 +263,7 @@ private: + void initializeWlSurface(); + bool shouldCreateShellSurface() const; + bool shouldCreateSubSurface() const; +- void reset(bool sendDestroyEvent = true); ++ void reset(); + void sendExposeEvent(const QRect &rect); + static void closePopups(QWaylandWindow *parent); + QWaylandScreen *calculateScreenFromSurfaceEvents() const; +-- +2.16.3 diff --git a/dev-qt/qtwayland/files/qtwayland-5.12.4-client-reset-frame-callback-timer-when-window-hiding.patch b/dev-qt/qtwayland/files/qtwayland-5.12.4-client-reset-frame-callback-timer-when-window-hiding.patch new file mode 100644 index 000000000000..8d4378243412 --- /dev/null +++ b/dev-qt/qtwayland/files/qtwayland-5.12.4-client-reset-frame-callback-timer-when-window-hiding.patch @@ -0,0 +1,39 @@ +From a4e6f88f50d1a1dd56df77ce8b07b98aceb20ddc Mon Sep 17 00:00:00 2001 +From: David Edmundson <davidedmundson@kde.org> +Date: Sun, 23 Jun 2019 13:25:16 +0200 +Subject: [PATCH] Client: Reset frame callback timer when hiding a window + +If we hide a window whilst a compositor has a pending frame to show, +it's possible the compositor will not render the frame and not return +the callback. + +If this happens on the next window expose we can be left with +mFrameCallbackTimedOut still true causing isExposed() to remain false +and us to not send the next buffer when we later show the window again. + +Change-Id: I507410415d1a930fd5fa736412055e68fdf6c1d3 +Reviewed-by: Johan Helsing <johan.helsing@qt.io> +--- + src/client/qwaylandwindow.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp +index 7c8ecadaa..2b243bc44 100644 +--- a/src/client/qwaylandwindow.cpp ++++ b/src/client/qwaylandwindow.cpp +@@ -254,6 +254,13 @@ void QWaylandWindow::reset(bool sendDestroyEvent) + mFrameCallback = nullptr; + } + ++ int timerId = mFrameCallbackTimerId.fetchAndStoreOrdered(-1); ++ if (timerId != -1) { ++ killTimer(timerId); ++ } ++ mWaitingForFrameCallback = false; ++ mFrameCallbackTimedOut = false; ++ + mMask = QRegion(); + mQueuedBuffer = nullptr; + } +-- +2.16.3 diff --git a/dev-qt/qtwayland/files/qtwayland-5.12.4-fix-stuttering-when-gui-thread-busy.patch b/dev-qt/qtwayland/files/qtwayland-5.12.4-fix-stuttering-when-gui-thread-busy.patch new file mode 100644 index 000000000000..794fb1275298 --- /dev/null +++ b/dev-qt/qtwayland/files/qtwayland-5.12.4-fix-stuttering-when-gui-thread-busy.patch @@ -0,0 +1,133 @@ +From ec9057081f1094fbfeb11449bc533997731e4079 Mon Sep 17 00:00:00 2001 +From: Johan Klokkhammer Helsing <johan.helsing@qt.io> +Date: Wed, 19 Jun 2019 14:05:22 +0200 +Subject: [PATCH] Client: Fix stuttering when the GUI thread is busy + +When we did invokeMethod for handling the frame callbacks, we had to wait for +the GUI thread to finish whatever it's doing before we would stop blocking. + +Fix it by clearing the frame callback timer and stop blocking immediately, +while delaying the rest of the work until it can be run on the other thread. + +Fixes: QTBUG-76397 +Change-Id: I343e4feac4838926b4fa2ccac2948988bc6c3bb7 +Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> +--- + src/client/qwaylandwindow.cpp | 59 +++++++++++++++++++++++-------------------- + src/client/qwaylandwindow_p.h | 2 +- + 2 files changed, 32 insertions(+), 29 deletions(-) + +diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp +index cecdbda92..7c8ecadaa 100644 +--- a/src/client/qwaylandwindow.cpp ++++ b/src/client/qwaylandwindow.cpp +@@ -610,29 +610,34 @@ const wl_callback_listener QWaylandWindow::callbackListener = { + Q_UNUSED(callback); + Q_UNUSED(time); + auto *window = static_cast<QWaylandWindow*>(data); +- if (window->thread() != QThread::currentThread()) +- QMetaObject::invokeMethod(window, [=] { window->handleFrameCallback(); }, Qt::QueuedConnection); +- else +- window->handleFrameCallback(); ++ window->handleFrameCallback(); + } + }; + + void QWaylandWindow::handleFrameCallback() + { +- bool wasExposed = isExposed(); ++ // Stop the timer and stop waiting immediately ++ int timerId = mFrameCallbackTimerId.fetchAndStoreOrdered(-1); ++ mWaitingForFrameCallback = false; + +- if (mFrameCallbackTimerId != -1) { +- killTimer(mFrameCallbackTimerId); +- mFrameCallbackTimerId = -1; +- } ++ // The rest can wait until we can run it on the correct thread ++ auto doHandleExpose = [this, timerId]() { ++ if (timerId != -1) ++ killTimer(timerId); + +- mWaitingForFrameCallback = false; +- mFrameCallbackTimedOut = false; ++ bool wasExposed = isExposed(); ++ mFrameCallbackTimedOut = false; ++ if (!wasExposed && isExposed()) // Did setting mFrameCallbackTimedOut make the window exposed? ++ sendExposeEvent(QRect(QPoint(), geometry().size())); ++ if (wasExposed && hasPendingUpdateRequest()) ++ deliverUpdateRequest(); ++ }; + +- if (!wasExposed && isExposed()) +- sendExposeEvent(QRect(QPoint(), geometry().size())); +- if (wasExposed && hasPendingUpdateRequest()) +- deliverUpdateRequest(); ++ if (thread() != QThread::currentThread()) { ++ QMetaObject::invokeMethod(this, doHandleExpose); ++ } else { ++ doHandleExpose(); ++ } + } + + QMutex QWaylandWindow::mFrameSyncMutex; +@@ -654,11 +659,11 @@ bool QWaylandWindow::waitForFrameSync(int timeout) + } + + // Stop current frame timer if any, can't use killTimer directly, because we might be on a diffent thread +- if (mFrameCallbackTimerId != -1) { +- int id = mFrameCallbackTimerId; +- mFrameCallbackTimerId = -1; +- QMetaObject::invokeMethod(this, [=] { killTimer(id); }, Qt::QueuedConnection); +- } ++ // Ordered semantics is needed to avoid stopping the timer twice and not miss it when it's ++ // started by other writes ++ int fcbId = mFrameCallbackTimerId.fetchAndStoreOrdered(-1); ++ if (fcbId != -1) ++ QMetaObject::invokeMethod(this, [=] { killTimer(fcbId); }, Qt::QueuedConnection); + + return !mWaitingForFrameCallback; + } +@@ -1090,9 +1095,9 @@ void QWaylandWindow::timerEvent(QTimerEvent *event) + } + } + +- if (event->timerId() == mFrameCallbackTimerId) { +- killTimer(mFrameCallbackTimerId); +- mFrameCallbackTimerId = -1; ++ ++ if (mFrameCallbackTimerId.testAndSetOrdered(event->timerId(), -1)) { ++ killTimer(event->timerId()); + qCDebug(lcWaylandBackingstore) << "Didn't receive frame callback in time, window should now be inexposed"; + mFrameCallbackTimedOut = true; + mWaitingForUpdate = false; +@@ -1154,11 +1159,9 @@ void QWaylandWindow::handleUpdate() + mWaitingForUpdate = false; + + // Stop current frame timer if any, can't use killTimer directly, see comment above. +- if (mFrameCallbackTimerId != -1) { +- int id = mFrameCallbackTimerId; +- mFrameCallbackTimerId = -1; +- QMetaObject::invokeMethod(this, [=] { killTimer(id); }, Qt::QueuedConnection); +- } ++ int fcbId = mFrameCallbackTimerId.fetchAndStoreOrdered(-1); ++ if (fcbId != -1) ++ QMetaObject::invokeMethod(this, [=] { killTimer(fcbId); }, Qt::QueuedConnection); + + // Start a timer for handling the case when the compositor stops sending frame callbacks. + QMetaObject::invokeMethod(this, [=] { // Again; can't do it directly +diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h +index c47123dc9..e8c9d5684 100644 +--- a/src/client/qwaylandwindow_p.h ++++ b/src/client/qwaylandwindow_p.h +@@ -216,7 +216,7 @@ protected: + WId mWindowId; + bool mWaitingForFrameCallback = false; + bool mFrameCallbackTimedOut = false; // Whether the frame callback has timed out +- int mFrameCallbackTimerId = -1; // Started on commit, reset on frame callback ++ QAtomicInt mFrameCallbackTimerId = -1; // Started on commit, reset on frame callback + struct ::wl_callback *mFrameCallback = nullptr; + struct ::wl_event_queue *mFrameQueue = nullptr; + QWaitCondition mFrameSyncWait; +-- +2.16.3 diff --git a/dev-qt/qtwayland/qtwayland-5.12.4.ebuild b/dev-qt/qtwayland/qtwayland-5.12.4-r1.ebuild index ac4fdc112362..6bc4d61f2112 100644 --- a/dev-qt/qtwayland/qtwayland-5.12.4.ebuild +++ b/dev-qt/qtwayland/qtwayland-5.12.4-r1.ebuild @@ -26,6 +26,13 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${P}-client-no-fake-surfacecreated-destroyed-events.patch + "${FILESDIR}"/${P}-fix-stuttering-when-gui-thread-busy.patch + "${FILESDIR}"/${P}-client-reset-frame-callback-timer-when-window-hiding.patch + "${FILESDIR}"/${P}-client-make-handleupdate-aware-of-exposure-changes.patch +) + src_prepare() { qt_use_disable_config libinput xkbcommon-evdev \ src/client/client.pro \ diff --git a/dev-qt/qtwidgets/Manifest b/dev-qt/qtwidgets/Manifest index 11be07624284..94200430dedc 100644 --- a/dev-qt/qtwidgets/Manifest +++ b/dev-qt/qtwidgets/Manifest @@ -1,6 +1,8 @@ +AUX qtwidgets-5.12.4-fix-notification-of-QDockWidget.patch 1476 BLAKE2B 046a588ad0345ee8ebc76abff6a0042aaa3d45ea89ea34c4e16587cf206cb7c869cc875e9cf9a8c4f124f8bb55fbbf19bc411f1279392dca8fcf57a49ecc5862 SHA512 da9249530c6718052cdbdff277319e99274dc6a545a963efe81d45900078e081908cf2e83ea6bc5ed273586b464f17a0f8bf7b41b58be8f3392615b432ae3302 AUX qtwidgets-5.12.4-revert-reset-winId.patch 1657 BLAKE2B 72a1cb720871ab907e22e0f26ddbc60a995002f99433a99da2e6e44ca5acae9611e155d301eed83ddbb84894e4238c08e050823e422ffcd646e3ff4bdf273879 SHA512 abfa16a13685f9689b176daaf600bfe31d03de6d61f8543430857e6823405d593ed4021e4290d627ad5c27ff7e17afb2801411deb13e6c1df435fd32a2eba370 +AUX qtwidgets-5.12.4-synth-enterleaveEvent-for-accepted-QTabletEvent.patch 2015 BLAKE2B 6aefa4fd585a7b4bdde335d48a90270c611c1762703ccac330641d761004dbed0df01cd683778c7b02175f0ac00de67709cff8474af958e486ca40f92ecdb15b SHA512 18c2e6c0b55f53f08d3ab3d1a65a83d264a203a8f9948a41a763e1306e462d70f0bac2156f4503f61c31ee38369dfec81e25685d2289db82bee78fda010a351e DIST qtbase-everywhere-src-5.12.3.tar.xz 48382148 BLAKE2B 779c43a75403e0f21357a90228bbcc3f216495613f4f17a2f442c7aa93f277a79cc7addf5ae44e22964069580f4932cfd14ba4773aa0ab30405d5587577a545c SHA512 1dab927573eb22b1ae772de3a418f7d3999ea78d6e667a7f2494390dd1f0981ea93f4f892cb6e124ac18812c780ee71da3021b485c61eaf1ef2234a5c12b7fe2 DIST qtbase-everywhere-src-5.12.4.tar.xz 48431020 BLAKE2B 7eeb3f6698984343ec14d03b8ad66ab23d81cd7a25c590316f7300c868ab869a9c96b125d56bba149ee116dff44bf47c751cce06f2cdd2d3121e5448708c5f6b SHA512 28b029a0d3621477f625d474b8bc38ddcc7173df6adb274b438e290b6c50bd0891e5b62c04b566a281781acee3a353a6a3b0bc88228e996994f92900448d7946 EBUILD qtwidgets-5.12.3.ebuild 1042 BLAKE2B 2d926509df7f1d79e5fc9ca45ab0f0eb7d3a019b975771c3e2c95b13801f82ae4c43eaf528080b724d87abaf16d637590c4529fcd5a9fd58976f3e79668e13b3 SHA512 2883a409b5012eb8ca7a51c49be0523332753de7c5d8d13151dd21977ae509802d09aa28685115631437b5771c20d87a6067e92901d65924f0cc0915791b2e2a -EBUILD qtwidgets-5.12.4-r1.ebuild 1120 BLAKE2B f0ddb20b7c856634f52377491575516a315044b175b4d3dd28168eb86aa03832c83918cfd1efac0b419eca70a9645961106318f61f098823b0c5919ac8c036d4 SHA512 4045be970b9a09a6ee0ad3e9823b5994d289101a496967214e7be2042e2bb4ce6842d92c48653e52dffdec4c88b59cd6f7435872d1488f4fce23951712b4c311 +EBUILD qtwidgets-5.12.4-r2.ebuild 1325 BLAKE2B 12764ac5c577a6740308a2d574d8de00e746a0768e70d19b4263f65b689450864cfacf961a4b8f3a4e9e3cbe49b9188a197b399b12eded2e642464618d834603 SHA512 9ff7feeb1a245a9162da6a6242baf7074fc4535d673d4c76ea9fccbb195be06fc3404fb936960aee5bebef651b5373b56f5265a0caba2bb3589ffc0b4a1527d4 MISC metadata.xml 569 BLAKE2B cd6274981285a9e65662016fa8042af5ee8a329f6b0f09f77cd8e34e08e00a817048f412cdaa214f32aa6ec921f607edf7d27af9c6cf04c323c5126306c81fc5 SHA512 a8f035a140ff40e92944369ea2d744c049a56becd4e10e72fe98065c203b458ea9ebae40ef23e4bb86d0487d0b68b52e6c2f9f8a99d1ffc4a12d1d372d061192 diff --git a/dev-qt/qtwidgets/files/qtwidgets-5.12.4-fix-notification-of-QDockWidget.patch b/dev-qt/qtwidgets/files/qtwidgets-5.12.4-fix-notification-of-QDockWidget.patch new file mode 100644 index 000000000000..5f72fef9d34c --- /dev/null +++ b/dev-qt/qtwidgets/files/qtwidgets-5.12.4-fix-notification-of-QDockWidget.patch @@ -0,0 +1,37 @@ +Description: fix notification of QDockWidget when it gets undocked + Before the patch the notification was emitted only when the docker + was attached to the panel or changed a position on it. + . + It looks like the old behavior was documented in a unittest, + so this patch might actually be a "behavior change". + . + Note: https://mail.kde.org/pipermail/distributions/2019-April/000317.html +Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=06b8644953fc5267 +Last-Update: 2019-06-14 + +--- a/src/widgets/widgets/qdockwidget.cpp ++++ b/src/widgets/widgets/qdockwidget.cpp +@@ -1171,6 +1171,8 @@ void QDockWidgetPrivate::setWindowState( + QMainWindowLayout *mwlayout = qt_mainwindow_layout_from_dock(q); + if (mwlayout) + emit q->dockLocationChanged(mwlayout->dockWidgetArea(q)); ++ } else { ++ emit q->dockLocationChanged(Qt::NoDockWidgetArea); + } + } + +--- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp ++++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp +@@ -669,7 +669,11 @@ void tst_QDockWidget::dockLocationChange + spy.clear(); + + dw.setFloating(true); +- QTest::qWait(100); ++ QTRY_COMPARE(spy.count(), 1); ++ QCOMPARE(qvariant_cast<Qt::DockWidgetArea>(spy.at(0).at(0)), ++ Qt::NoDockWidgetArea); ++ spy.clear(); ++ + dw.setFloating(false); + QTRY_COMPARE(spy.count(), 1); + QCOMPARE(qvariant_cast<Qt::DockWidgetArea>(spy.at(0).at(0)), diff --git a/dev-qt/qtwidgets/files/qtwidgets-5.12.4-synth-enterleaveEvent-for-accepted-QTabletEvent.patch b/dev-qt/qtwidgets/files/qtwidgets-5.12.4-synth-enterleaveEvent-for-accepted-QTabletEvent.patch new file mode 100644 index 000000000000..ab225009ab43 --- /dev/null +++ b/dev-qt/qtwidgets/files/qtwidgets-5.12.4-synth-enterleaveEvent-for-accepted-QTabletEvent.patch @@ -0,0 +1,49 @@ +From de811eca72d17b7ef734afc1d44af00cc5952f22 Mon Sep 17 00:00:00 2001 +From: Dmitry Kazakov <dimula73@gmail.com> +Date: Mon, 11 Mar 2019 13:18:06 +0300 +Subject: [PATCH] Synthesize Enter/LeaveEvent for accepted QTabletEvent + +When the tablet event is accepted, then Qt doesn't synthesize a mouse +event, it means that QApplicationPrivate::sendMouseEvent() will not be +called, and, therefore, enter/leave events will not be dispatched. + +The patch looks a bit hackish. Ideally, the synthesize should happen +in QGuiApplicationPrivate::processTabletEvent(), which takes the decision +about synthesizing mouse events. But there is not enough information +on this level: neither qt_last_mouse_receiver nor the receiver widget +are known at this stage. + +On Windows and other platforms where there is a parallel stream of +mouse events synthesized by the platform, we shouldn't generate these +events manually. + +Change-Id: Ifbad6284483ee282ad129db54606f5d0d9ddd633 +--- + src/widgets/kernel/qwidgetwindow.cpp | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp +index fbc71cd0ea1..729a7f701ae 100644 +--- a/src/widgets/kernel/qwidgetwindow.cpp ++++ b/src/widgets/kernel/qwidgetwindow.cpp +@@ -1051,6 +1051,18 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event) + event->setAccepted(ev.isAccepted()); + } + ++ /** ++ * Synthesize Enter/Leave events if it is requested by the system and user ++ */ ++ if (widget != qt_last_mouse_receiver && ++ event->isAccepted() && ++ !QWindowSystemInterfacePrivate::TabletEvent::platformSynthesizesMouse && ++ qApp->testAttribute(Qt::AA_SynthesizeMouseForUnhandledTabletEvents)) { ++ ++ QApplicationPrivate::dispatchEnterLeave(widget, qt_last_mouse_receiver, event->globalPos()); ++ qt_last_mouse_receiver = widget; ++ } ++ + if (event->type() == QEvent::TabletRelease && event->buttons() == Qt::NoButton) + qt_tablet_target = 0; + } +-- +2.16.3 diff --git a/dev-qt/qtwidgets/qtwidgets-5.12.4-r1.ebuild b/dev-qt/qtwidgets/qtwidgets-5.12.4-r2.ebuild index 9839e4d9c9df..9d414296830e 100644 --- a/dev-qt/qtwidgets/qtwidgets-5.12.4-r1.ebuild +++ b/dev-qt/qtwidgets/qtwidgets-5.12.4-r2.ebuild @@ -44,6 +44,9 @@ QT5_GENTOO_PRIVATE_CONFIG=( PATCHES+=( "${FILESDIR}/${P}-revert-reset-winId.patch" # bug 689704 + "${FILESDIR}/${P}-fix-notification-of-QDockWidget.patch" + # Still pending: https://codereview.qt-project.org/c/qt/qtbase/+/255384 + "${FILESDIR}/${P}-synth-enterleaveEvent-for-accepted-QTabletEvent.patch" ) src_configure() { |