summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | | Doc: Add documentation dependency to Qt CoreTopi Reinio2018-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDoc generates the following note for a number of functions: 'Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.' Q_INVOKABLE is meant to be a link which fails without Qt Core. Change-Id: Id67120e37992c671c954b04309e9fd253bf184e1 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | Adapt to qtbase 5.10 API change: qssize_t -> qsizetypeLiang Qi2018-01-072-2/+2
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-65600 Done-with: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I34116dad8eecd01090596270965b9a24f6fe8f39 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Client: Don't leak the last Wayland sync callbackJohan Klokkhammer Helsing2017-12-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | If QWaylandDisplay is deleted while waiting for a sync callback, don't leak the callback. Change-Id: I4fd46cdc8c431e44998d70d1afc01018c4908f27 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | | Simplify and modernize QWaylandInputDeviceJohan Klokkhammer Helsing2017-12-052-67/+38
| | | | | | | | | | | | | | | | | | | | | | | | Use enum values and nullptr instead of using magic ints directly. Also get rid of ifdefs in constructors by using in-class member initializers. Change-Id: I037bec7070296a4a8cb46ebe85104caf5a08fb77 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | | Remove QWaylandExtendedSurface* from the private compositor APIJohan Klokkhammer Helsing2017-12-046-362/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes QWaylandExtendedSurface, QWaylandSurfaceExtensionGlobal. The only code touching these classes was QWaylandQuickSurface::setClientRenderingEnabled(), but that code was only useful if QWaylandSurfaceExtensionGlobal had already been instantiated. The extension is a remnant from the past, and since no examples or tests are using the extension, it's safe to remove it. Change-Id: Ife202cb035c836b73a7c03985f5bf3be0abebc3d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Implement basic key composition supportGiulio Camuffo2017-12-042-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use xkbcommon-compose to handle basic compose key support. We should expand on it in the future to handle things like resetting the compose state on text field switching. Task-number: QTBUG-54792 Task-number: QTBUG-64572 Change-Id: I9d1d5ca4c9991928e12979f69eaa477e0cb28ada Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Port away from QRegion::rects()Marc Mutz2017-12-042-3/+2
| | | | | | | | | | | | | | | | | | | | | Use begin()/end() instead. Change-Id: I1a73b4518ee7408271ec913a219c034e330b0d5a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | ivi: Try the ivi-shell as shell integration as wellHolger Hans Peter Freyther2017-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the IviApplication in a compositor and launching a Qt Client it will fail to initialize a shell. This is because QtWaylandClient::QWaylandIntegration::initializeShellIntegration will only try some shells by default. Add the ivi-application to make it work out of the box. Add it last to have XDG and WL shell take preference and avoid loading the libivi-shell.so. Change-Id: I5c97c65d81434cba59cf9cb5bbe4b6fd8ccf4757 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Fix mapToSurface when item dimensions are set by the compositorJohan Klokkhammer Helsing2017-11-241-1/+7
| | | | | | | | | | | | | | | Change-Id: I94dba4a1b2ef8e3f5db48fb403ed602e45340012 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | | Fix tst_client::windowScreen and tst_client::screens sometimes freezingJohan Klokkhammer Helsing2017-11-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes the callback in forceRoundTrip would be handled in response to the QEventDispatcher::aboutToBlockSignal signal emitted at the start of processEvents, and would wait there for more events that may never come. Task-number: QTBUG-64696 Change-Id: I4e38a4dd4158afc606e779ff615b5eef98b955b0 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-203-2/+10
|\| | | | | | | | | | | Change-Id: If69178e53ede77032d1a1e298e416fd69dd053f4
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-152-0/+9
| |\| | | | | | | | | | Change-Id: Ieb5a74f4741834a62cb1db03de2bb23eb060be74
| | * Add missing change signals for geometry and availableGeometryJohan Klokkhammer Helsing2017-11-061-0/+8
| | | | | | | | | | | | | | | Change-Id: I836be9a52fce41490ac4511f4d21d130abec7f55 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| | * Emit change signal when assigning socket name automaticallyJohan Klokkhammer Helsing2017-11-061-0/+1
| | | | | | | | | | | | | | | Change-Id: I6f92d5731e5f53fef37c442fd56e7e8260d8c4cb Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| * | remove qmldir from resourcesv5.10.0-beta4Shawn Rutledge2017-11-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | It must be installed on the filesystem. Duplicating it in resources was always wrong but now causes an error in 5.10. Task-number: QTBUG-64285 Change-Id: Ia8a9e11f92ea68977808bb6e87a818c0ca8d1208 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Client: Use QPointer for focus members of input device capabilitiesJohan Klokkhammer Helsing2017-11-172-10/+5
| | | | | | | | | | | | | | | Change-Id: I2824269f89fddb7e276cf0e35df3f7c063b6d8b3 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | | Automatically change scale when entering a new outputJohan Klokkhammer Helsing2017-11-154-4/+31
| | | | | | | | | | | | | | | | | | Change-Id: I99198d47eac5b2091fe2bfd8fc24646be9c9890a Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* | | Change serial parameter from int to uintJohan Klokkhammer Helsing2017-11-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | In QWaylandWlShellSurface::setPopup Change-Id: I591b759bf8db9548776b28a485d75b53507761f4 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | | Merge remote-tracking branch 'qt/5.10' into devPaul Olav Tvete2017-10-2725-189/+506
|\| | | | | | | | | | | Change-Id: I4f885a551093ada07da97fd3d99902e36f98595e
| * | Merge remote-tracking branch 'qt/5.9' into 5.10v5.10.0-beta3Paul Olav Tvete2017-10-2525-188/+505
| |\| | | | | | | | | | Change-Id: I6c283081669594b3e8c6b30194bb96e389319cb2
| | * Support threaded rendering for Nvidia EGLStreamsPaul Olav Tvete2017-10-251-44/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create and update the texture on the GUI thread. Make sure there is a valid context on the GUI thread: create one if necessary, and share it with the global share context. Note: this requires that threaded compositors set the Qt::AA_ShareOpenGLContexts application attribute. Task-number: QTBUG-63039 Change-Id: Ia19af0536f9df319cde84221ed53db1c2ef42293 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| | * Ensure QWaylandWindow::transientParent has a shell surfaceJohan Klokkhammer Helsing2017-10-251-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This may not be a perfect solution, but it's better than the current one, where the transient parent may not have a shell surface (because the window may be hidden or not yet initialized). Task-number: QTBUG-63840 Change-Id: Ia5f04376d4b6d12b41ceeab5ba13cdc1b63b4e3c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Compositor: Add missing QWaylandOutput::windowChanged emitJohan Klokkhammer Helsing2017-10-241-0/+1
| | | | | | | | | | | | | | | Change-Id: If02092ad3b9042e8f771f2bc55daed7a810191bd Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Add documentation for XdgShellV5 signalsJohan Klokkhammer Helsing2017-10-241-0/+92
| | | | | | | | | | | | | | | Change-Id: I6bb9385c709537a3ad924ad936bb87747e2ced7a Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>