summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Compositor: Fix mapToSurface for surfaces with bufferScale != 1Johan Klokkhammer Helsing2018-04-211-2/+2
| | | | | | | | | Since QWaylandSurface::size (public API) returns the buffer size in pixels and not the size in surface local coordinates, we need to also account for the surface buffer_scale in order to get surface local coordinates. Change-Id: I79a396c55b674b1ac42ca17e1e88e50c1506ce83 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix typo in wayland formatsAllan Sandfeld Jensen2018-04-161-1/+1
| | | | | Change-Id: Ic4a8c64fa0e1b56a8d21316c96e3eeb3f20fb8b1 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor: Add documentation for WaylandSurface::surfaceDestroyedv5.11.0-beta4v5.11.0-beta3Johan Klokkhammer Helsing2018-03-271-0/+13
| | | | | Change-Id: Ia4118d5242e6bf6dfb703db76e53ea09fbc25041 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Compositor: Add documentation for WaylandSurface::childAddedJohan Klokkhammer Helsing2018-03-271-0/+12
| | | | | Change-Id: Ibcaa85986764545128a18981e17dac9838606f69 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Compositor: Add documentation for XdgSurfaceV6::toplevel and popupJohan Klokkhammer Helsing2018-03-261-0/+34
| | | | | | Change-Id: I8ad5f8ad60081647aef2472fea462f37ff62b8b4 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* Compositor: Add documentation for XdgShellV6Johan Klokkhammer Helsing2018-03-261-0/+77
| | | | | | Change-Id: Ic6976f8368be7bbd61652fc1b62b6439d3509b81 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* Fix crash when calling setVisible for EGL windows twice within one slotJohan Klokkhammer Helsing2018-03-232-9/+0
| | | | | | Task-number: QTBUG-63411 Change-Id: I56c367a1801d215e93bf195332272cfee300cdd8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix QWaylandXdgToplevelV6Private::lastSentConfigure()Johan Klokkhammer Helsing2018-03-211-1/+1
| | | | | | | | | | | Previously it would return the first pending configure instead of the last. This could sometimes cause sent state or size to get lost if handleFocusReceived() and one of the sendConfigure variants happened in rapid succession. Change-Id: I8cb379c4bcb7b05c027f7ede31e946ac5717d305 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Ensure a QWaylandQuickItem has keyboard focus before sending key eventsJohan Klokkhammer Helsing2018-03-211-1/+4
| | | | | | | | | If a QWaylandQuickItem had gotten focus in other ways than through QWaylandQuickItem::takeFocus, then the keyboard focus would not be updated. Change-Id: I6b5ee6d33449f0048e1c44765c1723eaa82ffd69 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* xdg-shell v5,v6 shell integrations: Fix crash when showing popupsJohan Klokkhammer Helsing2018-03-204-7/+8
| | | | | | | | | | | | | | | | If a popup was shown without any input events happening first, it would cause nullptr dereferences in both xdg-shell v5 and v6. Fixes crashes in: - tst_QAccessibility::comboBoxTest - tst_QAccessibility::menuTest - tst_QWindow::touchInterruptedByPopup - tst_QFocusEvent::checkReason_Popup Task-number: QTBUG-67150 Change-Id: Ib3e06326f71e4ab5f74727cb4f79626a21c34d55 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Fix various documentation issues for XdgShellV6Johan Klokkhammer Helsing2018-03-181-27/+25
| | | | | Change-Id: Ibb7063e10cd99294025935d073a96a7e8bf6ea22 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Compositor: Don't call send_configure variants with an invalid sizeJohan Klokkhammer Helsing2018-03-153-0/+12
| | | | | | | | Print a warning and return instead. Change-Id: I1db5109f633ee2dc7d252b387c207f474784da43 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Compositor API: Don't try to configure negative sizesJohan Klokkhammer Helsing2018-03-153-3/+7
| | | | | | Change-Id: Ie9df312a1926ea5190f6e91268b8920ad519d794 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Don't try to create compatibility GL context when profile is unsetv5.11.0-beta2Johan Klokkhammer Helsing2018-03-091-4/+12
| | | | | | | | Context creation would sometimes fail because of this. Change-Id: Icf73a42ee2bb984ebfc09b7ed98f094d544134b8 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QWindow::requestActivate() is not supported on WaylandJohan Klokkhammer Helsing2018-03-082-2/+3
| | | | | | | | | | Return false for the WindowActivation capability to ensure we don't run tests that require it. Change-Id: Ia24d6eef02d462a25f3d50597debda9e062b3955 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Show warning when trying to minimize on wl-shellJohan Klokkhammer Helsing2018-03-071-1/+1
| | | | | Change-Id: Ice040dad70d0bcaf8bd101da5956ae75e211fe91 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Add logging category for Wayland platform pluginJohan Klokkhammer Helsing2018-03-052-0/+5
| | | | | | Change-Id: Ic42119e47afc7bda72eb985fe86d1343a762c274 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Test for null pointer before using itAntonio Larrosa2018-03-051-1/+1
| | | | | | | | Task-number: QTBUG-66867 Change-Id: Ibbe407fa3ac32141b52fa0086e9f1ebfd27052ba Done-with: Fabian Vogt <fvogt@suse.de> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Jan Grulich <jgrulich@redhat.com>
* Client: Implement QPlatformWindow::startSystemMove()Johan Klokkhammer Helsing2018-03-059-9/+24
| | | | | | | | | Hooks into what we already use for the window decorations. Task-number: QTBUG-58044 Change-Id: Idcd971f69d52a5bb760bb6bffb26e9f5bdd429df Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove unused variable QWaylandPointerPrivate::hasEnteredJohan Klokkhammer Helsing2018-03-011-1/+0
| | | | | Change-Id: I0aa381466ad48e47d87c8e3bcff3a162e91b13b3 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Use override when applicableJohan Klokkhammer Helsing2018-02-2878-103/+103
| | | | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-override. This adds the "override" keyword where it's possible and also removes the "virtual" keyword when redundant. Change-Id: I899950e5cf8782785d30a245a9c69c1720905d50 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use default member initialization for raw pointersJohan Klokkhammer Helsing2018-02-2867-126/+126
| | | | | | | | Initialize to nullptr to prevent undefined behavior. Change-Id: I7753c0be77a886d62ecb1cd7b86fc8c98340b0b8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Init variables where they are declared when possible (clang-tidy)Johan Klokkhammer Helsing2018-02-27146-734/+329
| | | | | | | | | | | | | | | | | | | | clang-tidy -p compile_commands.json $file \ -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' \ -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' \ -header-filter='qtwayland' \ -fix Afterwards I ran search and replace on the diff to clean up some whitespace errors: - Replaced '(\n\+[^:\n]*)(:\s+\+\s+)' with '$1: ' - Replaced '(\n\+[^,\n]*)(,\s+\+\s+)' with '$1, ' - Replaced '\n\+\s*\n' with '\n' I also had to do some manual edits, because for some reason, this particular clang-tidy check doesn't trigger for some files. Change-Id: I3b3909bac4bf20108bbe8ad1e01bcc54236dae1b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Client: Fail gracefully when wl_display_connect failsJohan Klokkhammer Helsing2018-02-268-9/+52
| | | | | | | | | | | | | [ChangeLog][QPA plugin] If we're unable to create a connection to the Wayland display, fail gracefully so other platform integrations can be tried instead. This also adds QWaylandIntegration::hasFailed() which can later be extended to report that the platform plugin is unusable for other reasons. I.e. no compatible shell extensions or similar. Task-number: QTBUG-59762 Change-Id: I0f1ae73982e2860814235c1a189741d130e1db3e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix crash when connecting a new screenJohan Klokkhammer Helsing2018-02-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | In QWaylandWindow::virtualSiblings, don't include screens that have not been added yet. I.e. QWaylandScreens for which QPlatformIntegration::screenAdded has not yet been called. There are two reasons why this crash wasn't covered by the removePrimaryScreen() test. First of all, the mock output didn't send wl_output.done events when updating the mode/geometry. These wayland events are what causes QWindowSystemInterface::handleScreenGeometryChange() to be called (where virtualSiblings are called). Furthermore, virtualSiblings is only called when the geometry actually changes, so add a new test that changes the screen geometry of the existing screen while a new one is being added (i.e. moves it to the right). Task-number: QTBUG-62044 Change-Id: I623fbf8799d21c6b9293e7120ded301277639cc6 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Aleix Pol Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use nullptr instead of 0 or NULLJohan Klokkhammer Helsing2018-02-2053-144/+144
| | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-nullptr, and some manual cleanup to prevent QFlag macros to be affected. Change-Id: I88f94390185bc6e6f23693b68723cd5710815ae6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-123-2/+96
|\ | | | | | | Change-Id: I851b9b1bdfaa8be403d69f43b82a3f745038cc1c
| * Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-02-023-2/+96
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/extensions/extensions.pri Change-Id: Ia9a5bd52b7cac9a4f66e7c5deb43d89f0c792325
| | * Add documentation for QWaylandShellSurfaceJohan Klokkhammer Helsing2018-01-262-0/+94
| | | | | | | | | | | | | | | | | | Change-Id: I5948aea1afdd8b9a71e6de128a5203eb9422f5e1 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * Fix incorrect documentation of QWaylandQuickItem::paintEnabledJohan Klokkhammer Helsing2018-01-221-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: Id24b417687843709d9f7df499c4e8c8428f658b6 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Compositor API: Add support for hardware compositingJohan Klokkhammer Helsing2018-02-0926-9/+1243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Add a tech preview for a plugin-based hardware layer API and a VSP2 implementation (for Renesas R-Car M3 and H3). Task-number: QTBUG-64600 Task-number: QTBUG-64604 Change-Id: Ia4abfb6343cf4f006ba408d293ec9464cd6f31b7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Fix compilation for Renesas R-Car M3Johan Klokkhammer Helsing2018-02-082-2/+2
| | | | | | | | | | | | | | | Change-Id: Ib85001884bb880a18d8aa1241da0eb614a6b58ba Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'qt/5.10' into devPaul Olav Tvete2018-01-3118-85/+127
|\| | | | | | | | | | | Change-Id: I603cbb164e6015c1bb7796bd8bb055d84dbc3b04
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-184-2/+6
| |\| | | | | | | | | | Change-Id: I6c201769561f53d88c89f75cce7d9a7b2643d2f6
| | * Fix requestUpdate()Paul Olav Tvete2018-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit 3e745ea053e42ba087438203df3bd76b30a08eb2, mFrameCallback is set to null when the next buffer is attached, not when the callback arrives. This means that a requestUpdate() after the frame callback would never be delivered. The solution is to test mWaitingForFrameSync instead. There is still a small race condition, but the failure case is that the update will arrive after 5 ms instead of exactly at frame sync. Change-Id: I413ed2b76c8527f825e501077bab712146b6705f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| | * Merge remote-tracking branch 'origin/5.9.4' into 5.9Liang Qi2018-01-184-4/+8
| | |\ | | | | | | | | | | | | Change-Id: If72cba3251b792028a51f815f2f0cb064779bcec
| | | * Fix static builds with libwayland-eglv5.9.4Johan Klokkhammer Helsing2018-01-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a naming conflict between the client buffer integration, wayland-egl, and the system library libwayland-egl.so Rename the plugin binary to qt-plugin-wayland-egl to avoid the issue. Task-number: QTBUG-65652 Change-Id: Ib074c25e269a5e11b087fb4c3ddb15fef7d4a7ee Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | | * Fix protocol error when destroying xdg surfaces (v6)Johan Klokkhammer Helsing2018-01-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Destroy role object for toplevels when destroying the xdg surface. Task-number: QTBUG-65568 Change-Id: Ibe027c3eef8160f9fd2cfb05971c92ceb155f95b Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| | | * Revert "Ref count buffer usage"Johan Klokkhammer Helsing2018-01-052-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a buffer is committed multiple times, not all compositors (i.e. Weston) send a matching number of release events. This caused clients to freeze on some occasions on those compositors because they were waiting for a release event that never came. This reverts commit 5f38652cd52c03e9df8600f5f41e044820c3062c. Backport from 5.10.0 to 5.9.4 Task-number: QTBUG-64631 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 2767d0533f2901517c87d9c99bcda26564484280) Change-Id: I2acf5574a1b792d3bbf928fb0bc328aa8ee8ffe0 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| | * | Don't recreate hidden egl surfacesDavid Edmundson2018-01-161-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWaylandEglWindow deletes surfaces when a window changes from hidden to visible, presumably as a result of us not having a valid wl_surface object. By extension it doesn't make sense to create a surface whilst a window is still hidden. This fixes a crash where a QQuickWindow hides and then is destroyed. In QQuickWindow destruction we have to create a valid context in order to delete any textures/assets owned by the scene graph; as the wl_surface has gone this causes an error in the EGL libs when we create an EGL surface. Task-number: QTBUG-65553 Change-Id: I9b37a86326bf2cd7737c4e839c1aa8c74cf08116 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-0712-78/+115
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/compositor/compositor_api/qwaylandquickitem.cpp Change-Id: Id2f49e8703a67daedcee66db83f006df828d9da0
| | * Fix for big memory leak in Qt based compositorsRobert Griebl2017-12-192-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | The system would leak a complete buffer every time the client attached a new Wayland buffer. For QML applications this will normally happen every time a new animation is started. Change-Id: Ie4981ccbb2e09d702ee291f1144e3b8aa84c0d1d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Fix broken documentationJohan Klokkhammer Helsing2017-12-056-59/+40
| | | | | | | | | | | | | | | Change-Id: I16f11c32c861908e34de0cb28c8ad51378aa6e61 Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * wayland-egl: use egl compiler optionsSamuli Piippo2017-12-041-1/+1
| | | | | | | | | | | | | | | Change-Id: I6f8dcadf3cffecc6097ad0ad5e8245831b3ce0c1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Fix decoding of multi-planar surfaces (YUV video)Paul Olav Tvete2017-11-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLTexture::bind() expects texture unit number as plain uint number (e.g. 0,1,2) and not as GLenum (GL_TEXTURE1) Task-number: QTBUG-64841 Change-Id: Id471fc9976677ac8a358f04b9ae09c6a32beef63 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| | * Fix various documentation errors for QML methods and signalsJohan Klokkhammer Helsing2017-11-237-15/+15
| | | | | | | | | | | | | | | Change-Id: I9461fae92ec3d41e4f9e866a6a4fa7554a309ecd Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| | * Add documentation for QWaylandQuickItem::surfaceDestroyedJohan Klokkhammer Helsing2017-11-231-0/+26
| | | | | | | | | | | | | | | | | | Change-Id: I7fd1e44974857b77fea27e75ef791603e607642e Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * | Fix crash when opening a window with a hidden parentAleix Pol2017-12-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a transient parent but it doesn't have a shell surface. We need to make sure that it exists before setting the transient parent's shell surface as the parent to the window. Change-Id: I918b2f14074217638529ba73530f0102f7438079 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| * | Revert "Ref count buffer usage"Johan Klokkhammer Helsing2017-11-212-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a buffer is committed multiple times, not all compositors (i.e. Weston) send a matching number of release events. This caused clients to freeze on some occasions on those compositors because they were waiting for a release event that never came. This reverts commit 5f38652cd52c03e9df8600f5f41e044820c3062c. Task-number: QTBUG-64631 Change-Id: I818d9bd71e5d9ce7a351a2010914b7219b1975bc Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | QWaylandWindow: Fix incorrect namespace orderJohan Klokkhammer Helsing2018-01-161-2/+2
| | | | | | | | | | | | | | | Change-Id: I741d3fb392c6121f2d8514ee2504fc88f99092ff Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>