summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Test for null pointer before using itAntonio Larrosa2018-03-141-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> (cherry picked from commit e283cc059c83cbb4fe677beaca8aebb99156ccc5)
* 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. The cherry-picked version does not include the tests from the original patch. 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> (cherry picked from commit fd9fec4fc7f43fb939e8e5a946c7858390bbd9d3)
* 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>
* 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>
* 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>
* 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>
* 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>
* Ref count buffer usageDavid Edmundson2017-10-232-4/+4
| | | | | | | | | | | | | | | | | | | | The QPlatformBackingStore can get flushed multiple times between paints. Flush sets the front buffer, but it does not create a new backbuffer. We can't do so without doing an expensive pre-emptive copy. This means we send the same front buffer multiple times. This is somewhat questionable with regards to the Wayland specification, but seems to work. If we do send a buffer multiple times we can't consider it free until the last attached buffer is released; otherwise we end up painting into a buffer whilst the server is still using it, leading to flickering. Change-Id: I8235eed6a85f0d52b37544e7bcb623b16a9dd832 Reviewed-by: Marco Martin <mart@kde.org> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Add documentation for XdgSurfaceV5 signalsJohan Klokkhammer Helsing2017-10-201-1/+129
| | | | | Change-Id: If1e3304cb9a8da2aeb20802759370bc2f0f476dd Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Fix crash when wl-shell setType is called with a hidden parentJohan Klokkhammer Helsing2017-10-201-2/+4
| | | | | | | | Fall back to creating a toplevel instead Change-Id: If7db27d08b79e4f9f8c82fa8f9bf73abdb2585d9 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix outdated FDL license headerKai Koehne2017-10-204-20/+20
| | | | | Change-Id: Id4ba079514c7844821adac3c0c108af7deb57889 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix crash after destroying view with mouse focusJohan Klokkhammer Helsing2017-10-186-76/+112
| | | | | | | | | | | | | | | Don't emit QWaylandSeat::mouseFocusChanged with a destroyed QWaylandView. QWaylandPointer has been refactored to make it easier to follow enter and leave logic. A missing emit for buttonPressedChanged has been fixed as well. This also adds a test for pointer events to verify that setting mouse focus works and that the crash has been fixed. Task-number: QTBUG-63208 Change-Id: Id0c174a7b609dfd0152f3ae446dd51fd8befd554 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix incorrect documentation for QWaylandWlShellSurface::surfaceRequestedJohan Klokkhammer Helsing2017-10-171-6/+25
| | | | | | | And add documentation for QWaylandWlShellSurface::surfaceCreated Change-Id: Iea730b7aee8403f0accae686d9d0fbbf086c7d86 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* Compositor documentation: Specify return types for objectsJohan Klokkhammer Helsing2017-10-1710-21/+22
| | | | | | Change-Id: I9ff21c7d8b085be8fbcb102b5284ec1ac5dfb40b Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Documentation: update examples for extensionsJohan Klokkhammer Helsing2017-10-162-3/+3
| | | | | | Change-Id: If8840594b4077a464e97b4cb6db2fe8b70edf70d Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* QWaylandWindow: reset window should reset maskChristophe Chapuis2017-10-131-0/+2
| | | | | | | | | | | When QWaylandWindow::reset() is called, the window's mask is not changed. It means that when the window will be initialized again, it will not re-send the mask description to the server side through Wayland. Task-number: QTBUG-62638 Change-Id: I07d561f466836bbd90ae58521c0768ed85554256 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Christophe Chapuis <chris.chapuis@gmail.com>
* Add missing QML documentation for IviSurfaceJohan Klokkhammer Helsing2017-10-031-3/+14
| | | | | Change-Id: I4b84d7eac0016dccaa370419487940e32130617e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Add missing documentation for IviApplicationJohan Klokkhammer Helsing2017-10-031-0/+43
| | | | | Change-Id: I7f958175fdb5ae21babae259bf2e8d5e749cd396 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Remove duplicate QML documentation of Shell.focusPolicyJohan Klokkhammer Helsing2017-10-031-7/+1
| | | | | Change-Id: I6c972b79555d41cba9e8c5954e595f76b580725b Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Add QML documentation for WaylandSeatJohan Klokkhammer Helsing2017-10-031-0/+11
| | | | | Change-Id: I71f6714f2ac4d92baedd89246d57f20c159bda1b Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Update documentation for QWaylandQuickShellSurfaceItemJohan Klokkhammer Helsing2017-10-031-7/+7
| | | | | | Change-Id: I80b4f078d63ac32d9ce6d91fc46f0b9d9d7d7146 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Prevent '* * *' from appearing in WaylandView documentationJohan Klokkhammer Helsing2017-10-031-4/+5
| | | | | | | The documentation was missing the proper indentation. Change-Id: I3ce2afd8b9ea8c045f54202f942a8f55f831c1b2 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Compositor: Add missing cursorSurfaceChanged signalJohan Klokkhammer Helsing2017-10-022-1/+6
| | | | | Change-Id: I23a67b8189ab84e6a70c9e3de5da15cf2e9a9d77 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Documentation: Fix missing renames from Xdg* to Xdg*V5Johan Klokkhammer Helsing2017-10-024-29/+29
| | | | | Change-Id: Ia60e20a15151a76c337872bf46b4d09da519387c Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* The ping method belongs to XdgShellV5, not XdgSurfaceJohan Klokkhammer Helsing2017-09-271-1/+1
| | | | | Change-Id: I9f2ed6411ab0e24a2a6e6f194abe3ffaaba96756 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Fix server buffer integration override logicPaul Olav Tvete2017-09-141-1/+1
| | | | | | | | Assign to the actual variable instead of a new one with the same name. Change-Id: I9e4c3525891ff53f0194198b9c11f223df4c14a9 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Set window screen from wl_surface.enter and leave eventsJohan Klokkhammer Helsing2017-09-114-5/+78
| | | | | | | | | | | | | | | | | | | | | | | | Removes the pointer mScreen, which would previously cause a crash if the screen was removed. Ensures that QWindow::screen() is correct, except in the cases where: - The compositor has not yet sent enter and leave events (in which case the primary output is returned). - The compositor is not sending enter and leave events (although this is mandatory, some compositors don't do this). - The application developer has tried to move the window with QWindow::setScreen(QScreen *). Since there is no way for a client to ask to be moved to a specific monitor in windowed mode, we return the requested screen until a new enter or leave event is received. This will also be useful when implementing/fixing features where the current screen matters. Examples are QT_AUTO_SCREEN_SCALE_FACTOR and the optional output parameter to wl_shell_surface.set_fullscreen. Task-number: QTBUG-62044 Change-Id: Iafde2e278fbc8876e8dafe5b2a4d2482fdc7961a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Close popups in the correct orderPaul Olav Tvete2017-09-072-0/+20
| | | | | | | | | According to the protocol, child popups have to be closed before parents, but QMenuBar/QMenu will sometimes close the parent first. Change-Id: Id027ac483b727a19388df619fe1503d794e12c12 Task-number: QTBUG-62048 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Fix crash when window attach is called without waiting for frame callbacksJohan Klokkhammer Helsing2017-08-312-9/+7
| | | | | | | | | | | | | | | | | | | | | If QWaylandWindow::attach was called before getting the frame callback, it would overwrite mFrameCallback. Hence, all but the last frame callback would still be alive after the QWaylandWindow destructor. When the dangling callbacks got invoked the data pointer was statically casted to the deleted QWaylandWindow, resulting in undefined behavior. In this change we only delete frame callbacks from the render thread, avoiding a race condition we fixed earlier. And we always destroy the frame callback when adding a new one, ensuring that the destructor will clean up the only remaining callback. There's a test confirming that the crash has been fixed. This fixes the flakiness of many of the qtbase auto tests. Change-Id: Iecb08ab48216eac61b1ebc5c0e0664d4aac900c0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Update documentation for ShellSurfaceItem::shellSurfaceJohan Klokkhammer Helsing2017-08-311-7/+6
| | | | | | | | The old link to XdgSurface was broken due to the rename to V5. Added the other ShellSurface implementations as well. Change-Id: I012501d93353b27bb7bb6e14e56d5baecbdae6c1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Remove unimplemented method QWaylandTouch::focusDestroyedJohan Klokkhammer Helsing2017-08-241-3/+0
| | | | | Change-Id: I59d43d87e672015560a932c4ab5f376ad657c431 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Send pointer events to all bound resourcesJohan Klokkhammer Helsing2017-08-242-36/+60
| | | | | | | | | | | Previously we would send events to just one of the bound resources. An example of this, is the breeze Qt style, which would bind to the pointer resource a second time, which resulted in the original resource not receiving any events, which in turn resulted in an unresponsive client. Change-Id: Iac0ffe5d9ef0dfb95db89796515d7eb4a0b38227 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Remove unimplemented method QWaylandPointerPrivate::focusDestroyedJohan Klokkhammer Helsing2017-08-241-2/+0
| | | | | Change-Id: I83d5692b6361311ba0562b0c3e6e026f392f7ab5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Try -lEGL when checking for wayland-eglJohan Klokkhammer Helsing2017-08-152-2/+4
| | | | | | | | This will detect wayland-egl on an imx6 without pkg-config Change-Id: I9c0fe6eef375fd0431a218c3b0407505c29eead9 Reviewed-by: Karim Pinter <karim.pinter@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Remove unimplemented overload for QWaylandSeat::sendFullKeyEventJohan Klokkhammer Helsing2017-08-151-1/+0
| | | | | Change-Id: I2cc4e0877d5957c0939d62ec66ed2ce72f15e7e6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>