summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix the logic for decoding modifiers map in Wayland text input protocolv5.12.125.12Rodney Dawes2021-10-151-2/+4
| | | | | | | | | | | | | | Correctly check for the flags in the modifiers map when we get it from the compositor, instead of modifying the map in the for loop conditional. [ChangeLog][QWaylandInputContext] Fix modifiers map decoding logic when receiving the map from the compositor. Fixes: QTBUG-97094 Change-Id: Idad19f7b1f4560d40abbb5b31032360cfe915261 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit baa7ef511bf40280448e5f0e721ddd6da3301f3b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Bump versionJani Heikkinen2021-10-041-1/+1
| | | | Change-Id: Iffa3e5cc0142eac49cc75010f7a7824415a2617b
* Cleanup up all subsurface QQuickItems correctlyDominik Holland2021-08-021-0/+1
| | | | | | | | | | | | | | | When showing a surface with a subsurface in a QML based compositor, the subsurface QQuickitems are now destroyed when when main surface QQuickItem is destroyed and not just when the surface is destroyed. This prevents subsurface QQuickItems piling up when showing and hiding the client surfaces e.g. inside a StackView. Fixes: QTBUG-94602 Change-Id: I006a6a763d4daf560ba2a7b6f83e1de3e3c48906 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 5463a04097ee7824b2032fb058e289cf62bfd315) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix leaked subsurface wayland itemsv5.12.11Eskil Abrahamsen Blomfeldt2020-12-071-0/+1
| | | | | | | | | | | | | | | Whenever a subsurface was added we would create a QWaylandQuickItem, but this was never deleted. It is one-to-one with the surface, so it should be deleted at the same time. [ChangeLog][QtWaylandCompositor] Fixed a memory leak when creating subsurfaces. Task-number: QTBUG-88782 Change-Id: If4b3f15200ce3bd123ff73847d3593d174a39229 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 38fc568b30bf916165324c2cd2db127d2a9aa68c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Client: Fix reverse screen orderJohan Klokkhammer Helsing2020-11-194-9/+80
| | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] Fixed a bug where QGuiApplication::screens() and primaryScreen() would return initial screens in the reverse order they were added by the compositor. QGuiApplication::primaryScreen() will now return the first output added by the compositor. Calling forceRoundTrip in registry_global() meant it would call itself recursively if there were additional wl_output events in the queue. This in turn meant the screens got added in the reverse order. Instead we now add the screen to a list of not yet initialized screens and add it properly when we've received the required done events (wl_output and possibly zdg_output_v1). This also has the added benefit of wl_output hot plugging not calling forceRoundTrip(). Fixes: QTBUG-72828 Task-number: QTBUG-81657 Change-Id: I35c6959d6c219f65fd19d571a25b5a6cdb3f741b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> (cherry picked from commit 475910a75a5cd3332fe2f0e5740c4c3c2c0b8987) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Bump versionJani Heikkinen2020-11-061-1/+1
| | | | Change-Id: I768f9513038698d0164da8a923f1f3909ad76a3b
* Add changes file for Qt 5.12.10Antti Kokko2020-10-221-0/+37
| | | | | | | Change-Id: I191975d084a55a4b7b53975e03b03925ed66d1db Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 971ed94adbf538af5a09e4136921fc0e8cee9815) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Bump versionJani Heikkinen2020-10-141-1/+1
| | | | Change-Id: Ib53ae24de02a70a149071cd33a57df109df41a68
* Merge remote-tracking branch 'origin/5.12.9' into 5.12Qt Forward Merge Bot2020-06-171-0/+27
|\ | | | | | | Change-Id: I0af3ed21d846517c45d25b9074993faed8794419
| * Add changes file for Qt 5.12.9v5.12.9Antti Kokko2020-06-111-0/+27
| | | | | | | | | | | | | | | | | | + d18c29931b0bc889fff66bdbde89133544ba0529 Fix leaking of callback timers + 0a0e0eb8dca699858435dec5194b0b8b6ebd3cf8 Client: Make frame back callback timeout configurable + 32c423c4fc354631c8ac7ca167b188eac215caff Bump version Change-Id: I86dd6270b3cd46c3b1f9df6f4c0f99ebb75eefa4 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Add means for forcing non-blocking buffer swap supportOtto Ryynänen2020-06-162-4/+10
|/ | | | | | | | | | | | | | | | | | | | | | | In case of a driver that does not properly indicate its capability of supporting non-blocking eglSwapBuffers() call, the need arises to be able to manually force the resolution of that check. New environment variable QT_WAYLAND_FORCE_NONBLOCKING_SWAP_SUPPORT added. If it is defined to 0 (i.e. false), the non-blocking swap support is forced to behave as if the driver had been detected not to be supported. Equally setting it to 1 causes the non-blocking swap support resolution to remain true (default) even if driver reports it does not support it. [ChangeLog][Client] Added support for environment variable QT_WAYLAND_FORCE_NONBLOCKING_SWAP_SUPPORT, which can be used to force the resolution of detecting if EGL driver supports non-blocking eglSwapBuffers call. If you encounter application freezing while waiting indefinitely for a buffer swap, then try setting variable to 0. Task-number: QTBUG-84226 Change-Id: I92dc505d12daf4d78dc18e4f85f3a55ecdf109f3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 765ad803579c09ea5e827c60efbc89c5ac4fcd42)
* Bump versionAlexandru Croitor2020-04-221-1/+1
| | | | Change-Id: I05ba2940257377e253af3888447fbdb07be250fa
* Client: Make frame back callback timeout configurableEskil Abrahamsen Blomfeldt2020-04-162-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid rendering when windows are minimized, we try to detect this case by checking if 100 ms passes after an update before any frame callback arrives. Wayland expects to drive the rendering through frame callbacks, while Qt expects to be informed when a window is no longer visible and will run a tight, vsynced render loop until it gets the appropriate event. This mismatch causes issues, and the timeout is an attempt to avoid actively rendering to a hidden surface by detecting the missing callbacks. It causes problems on embedded, though, when a device is so busy that the timeout happens even when the window is visible. So we introduce a way to configure the timeout. Either increase its duration if you can guarantee a certain minimum time between events even with high load, or set it to 0 to disable it completely. (at the expense of drawing to invisible windows). Note that this is required for fixing a critical memory leak that happens when using Wayland on embedded. [ChangeLog][Client] Added support for QT_WAYLAND_FRAME_CALLBACK_TIMEOUT environment variable, which can be used to disable or change the internal frame callback timeout. If you see windows that stop rendering or minimize on heavy load, then try setting the variable to 0. Task-number: QTBUG-82914 Change-Id: I31f48930731c92c0aaf8bbc2e30cdb25fd14ddd1 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Merge remote-tracking branch 'origin/5.12.8' into 5.12Qt Forward Merge Bot2020-04-141-0/+20
|\ | | | | | | Change-Id: I4308aaa21c4441288e1eaa979abc0813cb442346
| * Add changes file for Qt 5.12.8v5.12.8Antti Kokko2020-03-181-0/+20
| | | | | | | | | | | | | | + aabf2166fbbcea1aa33287501815d18cafe5ad82 Bump version Change-Id: If1b81cefda5f183fd27235d222df26300873ca44 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Fix leaking of callback timersJanne Koskinen2020-03-282-28/+22
|/ | | | | | | | | Use two timers to create timeout trigger for framecallback. Removes multiple timers approach that is subject to race conditions. Fixes: QTBUG-82914 Change-Id: Ia10b1b4e055eee80f77076137066ecada683ba32 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Merge remote-tracking branch 'origin/5.12.7' into 5.12Qt Forward Merge Bot2020-01-311-0/+25
|\ | | | | | | Change-Id: Ic0592c48c1e9880d7276fb1a8361d4dc7c422a98
| * Add changes file for Qt 5.12.7v5.12.7Johan Klokkhammer Helsing2020-01-171-0/+25
| | | | | | | | | | | | | | | | | | + cc0c12bf96533cb92878e102a20d1a238e614f01 Bump version + f924acaf3d4c927d7d3283e752b82bf120b2c13e Stop using modern C++ + 1e1f692dbdb0b1b8a1bbed99b5ff550dc978cdcd Client: Always close popups when hiding a window Change-Id: I5d5f1c3a941ac51318cd8d24ee93da51bdf71516 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Bump versionAlexandru Croitor2020-01-281-1/+1
|/
* Merge remote-tracking branch 'origin/5.12.6' into 5.12Qt Forward Merge Bot2020-01-071-0/+56
|\ | | | | | | Change-Id: Ie099792a076a92136b753d377e2bdd9755551520
| * Add changes file for Qt 5.12.6v5.12.6Johan Klokkhammer Helsing2019-11-071-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 5400af8850a7a73a19443839fbd0c8f3d45b091b Make QT_WAYLAND_COMPOSITOR_QUICK a feature + 1cce394099bd83261a0fe3bb73acd5c4bd8a749a Client: Don't freeze in QDrag::exec if there was no drag focus + 2e9c90aaefdfe5f1e9b90159c5e6981230627055 Client: Refactor touch handling and fix various bugs + 33d2062f8ac9419ec1c6504be47fe48119e605bb Fix deadlock in QWaylandWindow::waitForFrameSync + 481cea71043dabf6d5ff33101a66693af86438e1 Compositor: Fix various input-related rounding errors + 4121e26d2bc235703603e812eef533b8b2e16d18 Client: Fix touch rounding errors + 1753b5b2f0d13549e181955faa506eac0e717201 sync.profile: remove two headers + 0c838ea604e2ac9871f78c8f11b30ce23a7c7750 Fix detection of wayland-kms support + 90f9c3c6fdb323a7fd509cb7fc018472cc5d1c13 Don't try to inject non-existent generated headers for xdg-shell v5 + 45859d7521074a4921b8459eb0a6e2cc71b9dd5a Client: Don't crash with long window titles using UTF-16 characters + 03e8c91fc28b77c4f027b6c6d582b85878efae41 Client: Fix 100ms freeze when applications do not swap after deliverUpdateRequest + 096bd6f6509dbf241eb33685f672112c38991c53 Compositor: Fix crash when trying to maximize an XdgToplevel with no output + c42dd53cdb2edfef0ee8bd0e7d8775dd0ab52850 Bump version Change-Id: I5b7abbeeb9c00c8f3e67ec3d179293b0dc51526d Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Client: Always close popups when hiding a windowJohan Klokkhammer Helsing2020-01-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not just popups that may have popups open on them. Always close open popups when hiding a window to prevent dangling pointers. [ChangeLog][QPA plugin] Fixed a crash when re-showing a popup after hiding its parent. Fixes: QTBUG-80562 Change-Id: I7cdac5c7a30e0add5ebf00259401e4d74626ce96 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org> (cherry picked from commit 7c0833f4bc22d2d947c793f0711e3f1e1a09012c) Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Stop using modern C++Johan Klokkhammer Helsing2020-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes compilation errors with c++11. Fixes: QTBUG-81024 Change-Id: I13ae380a122a2d52b7b362a7a39e661a22c74afc Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> (cherry picked from commit f7e035446355d9cb90141e508b5d33e019e14add) Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Bump versionFrederik Gladhorn2019-11-071-1/+1
|/
* Fix touch being ignored when down and motion are in the same frameJohan Klokkhammer Helsing2019-11-061-1/+4
| | | | | | | | | | | The Wayland protocol gives no guarantees about which events are part of a frame, so handle the case where we receive wl_touch.down and wl_touch.motion within the same frame. Fixes: QTBUG-79744 Change-Id: I5dd9302576d81da38e003c8e7e74da6a98def603 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 57c28f461a066c03ef8ae3f823c040fa91876fb8)
* Client: Fix crash when showing a child window with a hidden parentJohan Klokkhammer Helsing2019-11-052-3/+8
| | | | | | | | | | | | | [ChangeLog][QPA plugin] Fixed a crash when showing a window with a hidden parent. Now we just avoid creating the subsurface, so nothing is shown. Seems to be the same behavior as on xcb. Fixes: QTBUG-79674 Change-Id: Ia46fcd9a0da5aad4704816a41515cb1e128ac65f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 962b9be7992cef672cb6307af5653c97382c334f)
* Client tests: Fix flaky deadlockJohan Klokkhammer Helsing2019-11-041-1/+1
| | | | | | | | | | | | | | | | | | | Sometimes the test would wait indefinitely in the compositor constructor, while also waiting in the compositor thread for m_ready to become true. m_ready is set to true in applicationInitialized(), which is supposed to be called from the client thread after QGuiApplication has been created (and also after the MockCompositor constructor has returned). I.e. the problem is that the wake in MockCompositor::run may sometimes happen before the MockCompositor::MockCompositor starts waiting. Move the wake inside the pre-initialized compositor loop. Essentially waking every 20 ms until the application is initialized. Fixes: QTBUG-66570 Change-Id: Ia5eba5d08ce4d1d3eeca99eae6cfa7d9d4fd5a0b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 62e959eaa707a163daca69a42c733bbd272d41d6)
* Bump versionFrederik Gladhorn2019-10-301-1/+1
|
* Compositor: Fix crash when trying to maximize an XdgToplevel with no outputJohan Klokkhammer Helsing2019-10-281-4/+12
| | | | | | | | | | This cherry-pick also fixes a shadowed, unused variable introduced in the original commit. Fixes: QTBUG-78969 Change-Id: I4ecde3725b5307251070e331c97d96df328a3772 (cherry picked from commit 11f2e7df5762a23e66d1755b34f5f3d07208ae32) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Client: Fix 100ms freeze when applications do not swap after ↵Johan Klokkhammer Helsing2019-10-222-38/+9
| | | | | | | | | | | | | | | | | deliverUpdateRequest [ChangeLog][QPA plugin] Fixed a 100 ms freeze that would occur if applications did not draw after receiving a deliverUpdateRequest(). QtQuick does this at the start of animations. This should get rid of those backingstore warnings (and also remove a 100ms freeze before animations start in those instances). Fixes: QTBUG-76813 Change-Id: Id366bf4a14f402fa44530ae46e7b66d9988c14f6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: John Brooks <john.brooks@qt.io> (cherry picked from commit 9f5b96225885f927727a57b6123d8550d6c373bb)
* Client: Don't crash with long window titles using UTF-16 charactersJohan Klokkhammer Helsing2019-09-252-2/+15
| | | | | | | | | | | | | | | Previously, we set the max length in QString character length, which means UTF-16 characters (of potentially three bytes) counts as one character. The max limit of libwayland, however, is in bytes (and the string itself is converted to UTF-8). Fix it by dividing the character limit by three because in the worst case each UTF-16 character will use three bytes when UTF-8 encoded. Fixes: QTBUG-78478 Change-Id: Idf4721894e0fe6f3cd92bdc6ada7b0ea4199ea63 (cherry picked from commit 1ed0782e93dafb0a3d5ef3a02c9c3999825817ee) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Don't try to inject non-existent generated headers for xdg-shell v5Johan Klokkhammer Helsing2019-09-181-4/+0
| | | | | | | | | | | We use a hand edited version for xdg-shell-v5, which is added through src/plugins/shellintegration/xdg-shell-v5/pregenerated/xdg-shell-v5.pri so we shouldn't need to add it through sync.profile. Fixes: QTBUG-78210 Change-Id: Ida60f98c950b74132bd526cf44a4bf667cdce730 (cherry picked from commit 7e658cf26dc6e85dbe4a4216f7294dbb3a928dcc) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix detection of wayland-kms supportYuya Nishihara2019-09-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We get around the "private" symbol found in wayland-kms.h by substituting it with "priv", but doing that breaks the "private:" keyword in type_traits.h. So this patch forcibly includes math.h prior to s/private/priv/. main.cpp:3:17: error: ‘priv’ does not name a type #define private priv ^ In file included from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/cmath:43:0, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/math.h:36, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/wayland-util.h:34, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/wayland-server-core.h:32, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/wayland-kms.h:38, from main.cpp:4: /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/ext/type_traits.h:71:24: error: ‘__if_type’ has not been declared typedef typename __if_type::__type __type; ^~~~~~~~~ main.cpp:3:17: error: ‘priv’ does not name a type #define private priv ^ In file included from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/cmath:43:0, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/math.h:36, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/wayland-util.h:34, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/wayland-server-core.h:32, from /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/wayland-kms.h:38, from main.cpp:4: /opt/poky-agl/5.0.3/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/ext/type_traits.h:114:24: error: ‘__if_type’ has not been declared typedef typename __if_type::__type __type; ^~~~~~~~~ Change-Id: I2b42f37d5565833adcc065725119ab4912da82b0 (cherry picked from commit 382e3292aa0eb6addac84ddefeedc98c7f3b41b2) Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* sync.profile: remove two headersLiang Qi2019-09-161-2/+0
| | | | | | | | | Because they were checked in at 618d5093d5de082f9aaf32cca778c5eae6a8548d. Fixes: QTBUG-76439 Change-Id: I1809b1424262dfe39e6cc177eec487d9ca364337 (cherry picked from commit b90a57a66f0862d8953d0b858d4e11007172cc79) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Client: Fix touch rounding errorsJohan Klokkhammer Helsing2019-09-102-7/+13
| | | | | | | | | | | Touch now accounts for fractional input in the same way as for pointer input. Task-number: QTBUG-77457 Change-Id: I18e633bf7c7033187a641f757b8b24f52479971a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit b1a534a536892035fdf1e826a066bda6ab34b93a) Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Merge "Merge remote-tracking branch 'origin/5.12.5' into 5.12"Qt Forward Merge Bot2019-09-073-1/+48
|\
| * Merge remote-tracking branch 'origin/5.12.5' into 5.12Qt Forward Merge Bot2019-09-073-1/+48
|/| | | | | | | Change-Id: Ic73262146f51a9e7f4ffab46511654ad70c4f514
| * Add changes file for Qt 5.12.5v5.12.5Paul Olav Tvete2019-08-231-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + e008c69e231169425e2ae602deabc0eb749376ab Fix compile error with -no-opengl + cde2fe3fba31b9b8d258f0663bc34009fd769efd Compositor: Map touch ids to contiguous ids + af9ec8a76d7e62444fadb518256fc58723fe5186 Client: Don't add all windows to activePopups + af00b80178138e55be7ea892a118e6357798e0f2 Don't crash if we start a drag without dragFocus + ec9057081f1094fbfeb11449bc533997731e4079 Client: Fix stuttering when the GUI thread is busy + a4e6f88f50d1a1dd56df77ce8b07b98aceb20ddc Client: Reset frame callback timer when hiding a window + acba020f1b6725e2d431636b1a2cfb075672ddcb Bump version + 5ca9f28f4b272d3265b97c16029071a0070195a6 Fix compilation with C++20 + 25a46893782979c74f57ab725b1ce55fbfc4fa2f Fix the build when libs didn't get built + 3d5cec736ce17c6b40c52bb8966f8fc40b742664 Fix expose event compression + 43d8a3091894ceb4ab934167b2f3eda27564eb6d Backport texture sharing for NVIDIA + 86b0d64b6c44fd8c3c3dd133bf52239f5520e524 Client: Add safer fromObject function to scanner + 2838c7f33a0b2f40b026d00b3e00139f94c358e7 Fix incorrect conversion to straight alpha pixel formats + 3e96fa1df8d2bc0ec8ab66abae1f20439b786b40 Client: Fix large clipboard pasting Change-Id: Ie61a19a3adb04e1280b2f70839778cf2c708a85b Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Merge "Merge remote-tracking branch 'qt/5.12' into 5.12.5"Paul Olav Tvete2019-08-237-31/+39
| |\
| | * Merge remote-tracking branch 'qt/5.12' into 5.12.5Paul Olav Tvete2019-08-237-31/+39
| |/| | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandwindow.cpp Change-Id: I89fefe5bfc247eeaad3981850efa0faaab3cb145
| * | Client: Make handleUpdate aware of exposure changesDavid Edmundson2019-08-212-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Fixes: QTBUG-77747 Change-Id: I139a9b234cb6acba81d6c1d5fa58629904a25053 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Compositor: Fix various input-related rounding errorsJohan Klokkhammer Helsing2019-09-064-15/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPointF::toPoint (which is what the QPoint versions of the events use internally) uses qRound, which is not the right kind of rounding to use with the QRegion we use for the input region. This switches to use QPointF variants instead of QPoint wherever possible, and then the correct conversion (with qFloor) is done once in the new QPointF version of QWaylandSurface::inputRegionContains(). The compositor inputRegion test has now been updated to test the new API. [ChangeLog][Compositor] Fixed various rounding errors related to touch and mouse input. Fixes: QTBUG-77457 Change-Id: Ife2365abd56a239c34eee91310ab0e698a50d4ff Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 7f189ec10a9b3e9825dda30d3a8f86ee2e07b97f) Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | | Fix deadlock in QWaylandWindow::waitForFrameSyncPavel Tumakaev2019-09-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling the QOpenGLContext::swapBuffers from QGuiApplicationPrivate::processExposeEvent in some cases leads to recursive calls of QWaylandWindow::waitForFrameSync. Since the mWaitingForFrameCallback check in WaylandWindow::waitForFrameSync is performed after the mutex is locked, the QMutexLocker tries to lock the mFrameSyncMutex mutex in every recursive call, that leads to a deadlock. This patch moves the performing of the mWaitingForFrameCallback check before locking the mutex. Change-Id: Ia2d834b7dd03fcd91bbe29a3a897b4db2d155527 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Client: Refactor touch handling and fix various bugsJohan Klokkhammer Helsing2019-08-292-60/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename mTouchPoints to mPendingTouchPoints, to clarify that they're the accumulated state so far, which will be applied with the wl_touch.frame event. QWaylandInputDevice::Touch::mPrevTouchPoints is no longer needed and has been removed. Fixes the following issues with the old approach: - touchPointsReleased() only checked mTouchPoints, which was cleared on touch_frame and populated again on touch_motion and touch_down, which meant that it could return true even though there were still touch points left. Leading to the workaround for missing wl_touch.frame events on Weston being triggered to often. - Touch focus was cleared on any wl_touch.up event, not just the last one. - The order of the touch events was not stable and relied on the order of the events (QTBUG-77014). Fixes: QTBUG-77014 Change-Id: Ic3ecdc87e77b0e0276afefd127ad2b965142cbd4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Client: Don't freeze in QDrag::exec if there was no drag focusJohan Klokkhammer Helsing2019-08-293-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | af00b801 fixed a crash when starting a drag without a valid focus, but there is still a problem, because QDrag::exec will never return because it's waiting indefinitely in an event loop. - QWaylandDataDevice::startDrag can now fail by returning false. - When starting a drag fails, we cancel the drag through QWaylandDrag::cancelDrag wrapped in invokeMethod. - Also, don't unnecessarily create a data_source if we cannot start a drag. [ChangeLog][QPA plugin] Fixed a freeze that happened when starting a drag-and-drop operation without a valid source surface. Change-Id: Iea19b0c92c196a44d1274a966bee4ff519632d34 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Make QT_WAYLAND_COMPOSITOR_QUICK a featureUlf Hermann2019-08-2916-28/+29
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The define was only set when building Qt, not when including public headers in application code. Therefore, the sizes of objects did not match between the client code that calls new and the constructor inside Qt. Unfortunately, adding the additional members breaks binary compatibility. This has already happened between 5.11 and 5.12. It just wasn't apparent from the headers. If we removed the members again now, we would break binary compatibility again. Therefore, the best course of action seems to be acknowledging the break and adding the members also in the headers. [ChangeLog][Compositor][Important Behavior Changes] Between version 5.11 and 5.12 binary compatibility for the wayland compositor module was broken by adding an additional member to various classes. This was not apparent from user code as the member was behind an #ifdef which would only be set while compiling Qt. As several versions of Qt incompatible to 5.11 have already been released now, rolling back the incompatible change would introduce further incompatibility. Therefore, the change is made consistent by unconditionally adding the member to the headers. Fixes: QTBUG-75677 Change-Id: I3c1ee309ad8e0cd0b6389a76fd1d91e6e2be495c Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Client: Crash instead of exit when there's a wayland errorJohan Klokkhammer Helsing2019-08-222-17/+6
| | | | | | | | | | | | | | | | Qt applications should not call exit. Task-number: QTBUG-75779 Change-Id: I91190b10f8c8e111996cd73283061e6ceaa6b1f6 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Handle Key_Return explicitly instead of depending on the textAndy Shaw2019-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | When Key_Return is sent from Qt VirtualKeyboard it will send it as \n and not \r which means it will be interpreted as an unknown key. So since we know it will be able to map it in this case, we explicitly account for it so it can be mapped to the right key. Change-Id: Id5d8d9653e78975203f80790b7a3d332f0e011fa Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Fix race condition for client buffer integration initializationJohan Klokkhammer Helsing2019-08-202-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This race happened because QWaylandIntegration::clientBufferIntegration (which lazily initializes the integration) was called from numerous places including code that may run on different threads without any kind of syncrhonization. An example of this is Qt3D, which indirectly and simultaneously calls createPlatformWindow (from the GUI thread) and createPlatformOpenGLContext (from its render thread), both of which needs to use the client buffer integration. In this patch, we fix it by first checking if the integration is initialized. In that case, it's safe to use it. Otherwise we lock a mutex, re-check if initialization has happened on another thread in the meantime, and then finally we initialize it. This way we should avoid the expense of mutex locking after initialization is complete, while still staying race free during initialization. Fixes: QTBUG-76504 Change-Id: I327840ebf41e014882cb659bc3e4fafb7bdb7a98 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Client: Emit wl_surface lifetime signals on QWaylandWindowJohan Klokkhammer Helsing2019-08-192-1/+9
|/ | | | | | | | | | | | | | | | | | | | | | | Recent changes in QtBase means QtWayland will have to follow the convention of the rest of the QPA plugins and have QPlatformSurfaceEvent::SurfaceCreated and SurfaceAboutToBeDestroyed follow the QPlatformWindow (QWaylandWindow) lifetime and not the lifetime of wl_surface. Some users were depending on those events to get notified about wl_surface changes and used QPlatformNativeInterface in order to get the window's underlying wl_surfaces in responses to the events. The good news is that QPlatformNativeInterface is private (QPA) API, so we can provide an alternative by exposing new private API, which is what this patch does. The QWaylandWindow::wlSurfaceDestroyed signal already exists in the dev branch (introduced in eb66211ea9), so this is a backport of that signal as well as an addition of a new QWaylandWindow::wlSurfaceCreated signal. Task-number: QTBUG-76324 Change-Id: Ibc5748474cd52f5b9461fd1ad6cef973491174b1 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>