summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandintegration.cpp
Commit message (Collapse)AuthorAgeFilesLines
* wl_eglstream_controller implementation for NVIDIAPaul Olav Tvete2019-01-081-0/+2
| | | | | | | | | | | | | | This adds a new client buffer integration: wayland-eglstream-controller, which contains the EGLStream logic from wayland-egl, and additionally uses NVIDIA's wayland-eglstream-controller protocol to avoid the issue where the stream is not ready at the time of first buffer attach. This is not enabled by default. Can be used like this: QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=wayland-eglstream-controller ./pure-qml Fixes: QTBUG-71697 Change-Id: I73bb2a8fe9852afe1b5807cbb8c35dc4c7624dad Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-131-1/+10
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I6596d1a127cc93e53ec30cd881da1810cb8076d5
| * Add support for building QtWayland on macOSRobert Griebl2018-06-091-1/+10
| | | | | | | | | | Change-Id: I98aadd5019e913bf0adcf0122b7b209981926278 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Client: Accept prioritized list of shell integrationsPaul Olav Tvete2018-05-291-4/+4
| | | | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] QT_WAYLAND_SHELL_INTEGRATION environment variable now accepts a semicolon-separated list of shell integrations. Change-Id: I91364f53ea584bfbd9693b5ea58df07226c3e2c6 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* | Client: Add shell integration for xdg-shell stableJohan Klokkhammer Helsing2018-05-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] Added support for xdg-shell stable. Mostly a copy of xdg_shell unstable v6 with prefixes and suffixes removed. Otherwise, this is what changed: - The global is now named "xdg_wm_base", since "xdg_shell" was taken by xdg-shell <= v5. - Anchors and gravities are not bitfields anymore. Task-number: QTBUG-66783 Change-Id: I8ca881aae52cc07b22ff5e26df13a9a1566f58f4 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Client: Move xdg-shell-v6 to a pluginJohan Klokkhammer Helsing2018-05-281-4/+1
| | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] The xdg-shell-v6 shell integration has been moved to a plugin. Change-Id: I548d19590ddbc8ad3e791301359a6de17ac9dcd8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Move wl-shell to a pluginJohan Klokkhammer Helsing2018-05-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] The wl-shell shell integration has been moved to a plugin. This also adds API so shell integrations can return native resources for windows, as it was needed in order to continue to supporting wl_shell_surface. Change-Id: Ibc68ffcc5b0c6993d8f4e078f663e4d67340e1a5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Move xdg-shell-v5 to a pluginJohan Klokkhammer Helsing2018-05-091-7/+5
|/ | | | | | | | | | | | | This is the first step in deprecating xdg-shell unstable v5 and making the good names available for the good names for xdg-shell stable. Shell initialization has been refactored slightly, so the QWaylandShellIntegrationFactory actually tries to initialize the shell integration before returning it. Similarly for the factory method of non-plugin shells. Change-Id: I85e60594c4fc03c6f302c04316110aed428d28dc Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* QWindow::requestActivate() is not supported on WaylandJohan Klokkhammer Helsing2018-03-081-0/+2
| | | | | | | | | | 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>
* Init variables where they are declared when possible (clang-tidy)Johan Klokkhammer Helsing2018-02-271-6/+1
| | | | | | | | | | | | | | | | | | | | 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-261-0/+4
| | | | | | | | | | | | | [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>
* Use nullptr instead of 0 or NULLJohan Klokkhammer Helsing2018-02-201-2/+2
| | | | | | | | 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>
* 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>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-271-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandwindow.cpp src/client/qwaylandwindow_p.h src/compositor/compositor_api/qwaylandpointer.cpp Change-Id: Icbc22a1ae3cdd9cde438742817d07fccf97f647b
| * 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>
* | Replace Q_NULLPTR with nullptrKevin Funk2017-09-261-1/+1
|/ | | | | | | Change-Id: I9699a957430b8d3574ce29acb91b7ada9ea6209b Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-251-2/+8
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/wayland/custom-extension/client-common/main.cpp src/client/qwaylandwlshellintegration_p.h src/client/qwaylandxdgshellintegration_p.h src/compositor/compositor_api/qwaylandquickoutput.h src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h Change-Id: Ic78c610ddf102b0a185294f625bbfcb9238b0f3c
| * Fix build without feature.clipboardTasuku Suzuki2017-01-131-2/+8
| | | | | | | | | | Change-Id: I195efecca9350cb519865f251cdee9c6e23d3592 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-121-0/+5
|\| | | | | | | Change-Id: Idd91b55bc2b1e3506d9385b3352aeda06de6d4bc
| * Don't crash when trying to run on a compositor without outputsJohan Klokkhammer Helsing2016-11-281-0/+5
| | | | | | | | | | | | Change-Id: I164ad71f42dff1ad92576729040608016497a56a Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Deprecate QT_WAYLAND_USE_XDG_SHELLJohan Klokkhammer Helsing2016-12-061-25/+27
| | | | | | | | | | | | | | | | | | | | | | | | In favor of QT_WAYLAND_SHELL_INTEGRATION, which can be set to: - ivi-shell - wl-shell - xdg-shell-v5 - xdg-shell-v6 Change-Id: Ie2ca1184f22dcac56beb441329ea8b5a9a81baf4 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Add xdg_shell_v6 support for Qt clientsGiulio Camuffo2016-12-021-0/+5
|/ | | | | | | Task-number: QTBUG-56174 Change-Id: I6610905d0c9f29be29e812bcac193ea2a7e4f107 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Use new feature system, part 2Lars Knoll2016-11-231-8/+8
| | | | | | | | | Convert all uses of QT_NO_FOO to proper QT_CONFIG(foo) checks. Change-Id: Id0f0b3325c246567a43d6b2d71b0d69e5535e648 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'qt/5.7' into 5.8Paul Olav Tvete2016-11-101-1/+4
|\ | | | | | | Change-Id: Ibfe6fe6ed983b537d55544883b7dc75e5cc3fc37
| * Merge remote-tracking branch 'qt/5.6' into 5.7Paul Olav Tvete2016-11-101-1/+6
| |\ | | | | | | | | | Change-Id: I1efd16d6c5f939d61001376c3b010eae1927595b
| | * Fix build when some features are disabledPaul Olav Tvete2016-11-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make QtWaylandClient compile when Qt is configured with: -no-opengl -no-accessibility -D QT_NO_CLIPBOARD -D QT_NO_DRAGANDDROP -D QT_NO_SESSIONMANAGER Task-number: QTBUG-56192 Change-Id: Idc6aae6b36a35515109a27bed31a22e3e909ef27 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | | Fix memory leaksGiulio Camuffo2016-11-031-37/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several fields in QWaylandIntegration were never deleted, so use QScopedPointer to handle that. Also use QScopedPointer for all the heap allocated fields of the class. Change-Id: I4c33be4157a6e17abfa1610f84ef9a88afe5f38a Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | use modularized platformsupport modulesv5.8.0-beta1Oswald Buddenhagen2016-10-221-3/+3
| | | | | | | | | | | | | | | Change-Id: I7883470e22deb089240d86df7dc2d625a107a53e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-201-2/+2
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/extensions/qwaylandxdgshell.cpp Change-Id: Ic45b930e01fec803287d63b6f2347f45b7638ffc
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-171-2/+2
| |\| | | | | | | | | | Change-Id: If43a69c30682eab4a40149a03c619047e84c9f6d
| | * Fix build with QT_NO_ACCESSIBILITYSamuli Piippo2016-09-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The accessibility() function is ifdef'd in the base class, which makes build fail when Q_DECL_OVERRIDE is used here. Change-Id: Ic3d800ccf32b39f5bc8d3f94d222bc0d34457057 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Don't assume we always have a shellPaul Olav Tvete2016-09-051-3/+1
|/ / | | | | | | | | | | | | The mininimal-cpp compositor example does not have any shell extensions. Change-Id: Ifec2822ef4f5944eed02c19ddfc47419051364a4 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-111-9/+34
|\| | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddisplay.cpp src/client/qwaylanddisplay_p.h src/client/qwaylandxdgpopup_p.h Change-Id: If86ea09971773dc6c541f07819459a90e8ab73a0
| * Make wl_shell and xdg_shell use the QWaylandShellIntegration interfaceJohan Klokkhammer Helsing2016-08-091-9/+34
| | | | | | | | | | | | | | | | This simplifies the code in QWaylandDisplay and hopefully makes it easier to implement a prioritized shell selection mechanism later. Change-Id: I2bb3a13f8acedb60a6606cb3a8b5b228095eadf9 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Updated license headersAntti Kokko2016-01-201-14/+20
| | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I76ae5d3e64f096eb3163d6163a38d68c7c1ca756 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-011-0/+5
|\| | | | | | | | | | | | | Conflicts: src/client/qwaylanddisplay_p.h Change-Id: I602b90a055d1322af369fb7b77a68583154b660f
| * client: Remove the event threadGiulio Camuffo2015-11-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the compositor sends events to us while the main thread is blocked the socket notifier in the events thread would keep sending out the activated() signal, but no events would actually be read until the main thread starts to run again. That causes the event thread to keep queueing new events, and so allocating memory, potentially forever. This patch fixes the issue in maybe a bit radical way, that is by removing the event thread. The socket notifier now runs in the main thread so it will block if the events are not being read. Nowadays there is no real reason to keep the event thread around, as every thread that needs to receive wayland events can dispatch them on its own, we don't need a central dispatcher thread anymore. Change-Id: Ib7885e4b038b82719d78d193f465618a72cbe6af Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-151-7/+12
|\| | | | | | | | | | | | | Conflicts: src/client/qwaylandintegration.cpp Change-Id: I29120f06d33c2d383a41cf35ca4a59f5d8548ad7
| * Enable input context selectionBernd Weimer2015-08-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It was not possible to use a different input context than the platform context. This has been unified across major platforms, depending on the environment variable "QT_IM_MODULE", the following context is selected: - null: default platform context (Wayland in this case) - empty: no context - set: set one, if it exists and is valid (otherwise no context) Change-Id: I07c6fb339c434f99fc6e092a2e18f00600daa3bc Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com> Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Fallback to normal input method pluginsMarco Martin2015-08-201-1/+9
|/ | | | | | | | | | | wl_text_input is still a weston-specific extension. other compositors just expect the normal input context plugins to be instantiated when the wayland client connects. now try to use the one based upon wl_text_input, if fails fallback to the QPlatformInputContextFactory::create() route Change-Id: I034acf9ed19c766250f81fc5648d0318ae45f1bf Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Use a FontSmoothingGamma value of 1.0Giulio Camuffo2015-04-241-0/+7
| | | | | | | This is what the xcb plugin does, be consistent with it. Change-Id: I5befa2de3ff514ca0c9196eb7137682586cec126 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-171-22/+14
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I5a74d32515c3f1fe7aa1916f4241c92832510f8c Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Namespace the platform pluginsGiulio Camuffo2015-01-291-0/+4
| | | | | | | | | | | | There currently is a QWaylandInputDevice class both in the wayland QPA plugin and in the QtCompositor API. This causes the qwindow-compositor example to crash when running nested in a wayland session due to a mismatch between the two classes. By namespacing all the plugin code we make sure that name clashes will not happen anymore. Change-Id: I17497cff697599200bea68bf01dfde474526390f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Merge branch '5.4' into devGiulio Camuffo2014-11-151-3/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge done by Giulio Camuffo Conflicts: src/client/client.pro src/client/qwaylanddisplay.cpp src/client/qwaylandinputdevice.cpp src/client/qwaylandinputdevice_p.h src/client/qwaylandwindow.cpp src/compositor/compositor_api/qwaylandsurface.cpp src/compositor/compositor_api/qwaylandsurface_p.h src/compositor/wayland_wrapper/qwlsurface.cpp Change-Id: I1df878bb54f49d953c51215a2772869e261ebe81
| * Fix -no-opengl buildsLaszlo Agocs2014-10-141-0/+2
| | | | | | | | | | | | Task-number: QTBUG-41677 Change-Id: I039ec581e960eb70eb04aed6e65add70c563ba77 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Allow client side input device customizationMikko Levonmaa2014-10-061-0/+32
|/ | | | | | | | | | | Introduces QWaylandInputDeviceIntegration plugins to allow customization of input device related behavior. The plugin can be activated via the environment variable QT_WAYLAND_INPUTDEVICE_INTEGRATION Change-Id: If5629737752afacb29161f51c1b7c6e171fb2758 Reviewed-by: Mikko Levonmaa <mikko.levonmaa@lge.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Advertise new screens created after startupGiulio Camuffo2014-09-061-3/+0
| | | | | Change-Id: I995f49e52ec888830b478f1e1f9cc82132776725 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Destroy the QScreen when its wl_output is removedGiulio Camuffo2014-09-041-1/+2
| | | | | | Change-Id: I4532d05cca44c88fe38c14eacbe90c190f272b2c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Support RasterGLSurface windowsLaszlo Agocs2014-08-251-3/+7
| | | | | | | | | | | | | | | | | In an attempt to make QOpenGLWidget and QQuickWidget working on Wayland. Since Qt 5.3 all widget windows are of type RasterGLSurface (given that the plugin reports this capability which wayland will, with this patch). Such a window can behave either like a raster or an OpenGL window. This concept maps badly to platform plugins that have a rigid separation between raster and OpenGL platform window implementations. From now on, the OpenGL window implementation, that is used pretty much always, except for raw RasterSurface windows, must be prepared to behave like a raster window too, which involves having a backingstore. Change-Id: I0226704b8d5893843fcae68059c5fe9ad2f5e761 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Fix typoLaszlo Agocs2014-08-221-1/+1
| | | | | Change-Id: Idd4351b2650e8869d0e6038d11be5da37f4bdbb1 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>