summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* Use override when applicableJohan Klokkhammer Helsing2018-02-281-1/+1
| | | | | | | | | | 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-281-1/+1
| | | | | | | | 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-273-6/+3
| | | | | | | | | | | | | | | | | | | | 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-265-5/+40
| | | | | | | | | | | | | [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>
* Replace all occurrences of Q_DECL_OVERRIDE with overrideJohan Klokkhammer Helsing2017-01-238-8/+8
| | | | | Change-Id: I16b7b23efe944b49d1fcc9e7588cdb0a991cebd1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Set PLUGIN_CLASS_NAME in .pro filesPaul Olav Tvete2017-01-029-8/+13
| | | | | | | | | | | | This fixes static linking and cmake config file generation. In some cases, the class was renamed for disambiguation or just uniformity. Task-number: QTBUG-51248 Change-Id: Ibdce2e1b6a52312f84301c426632e94deeb567bd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Move qtwayland over to use the new configuration systemLars Knoll2016-11-231-9/+7
| | | | | | | | | | | | | Re-use configuration results from qtbase where possible and move all pkg-config handling over to be done at configuration time. Since waylandclient and waylandcompositor are two independent libs, this required some duplication of features and libraries used by both in the configure.json files. Change-Id: I1f3ec56c85cb780324cc7634a3ad7951125853a0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-301-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandinputcontext_p.h src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h Change-Id: Iac517e1985e4e67d7ca00ca4c10dcda9dd9079f9
| * Add missing Q_DECL_OVERRIDEs to client classes.Johan Klokkhammer Helsing2016-06-271-1/+1
| | | | | | | | | | | | Change-Id: I10e550a25ce498bbeedc242ac73059cc6fdcef30 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Remove traces of obsolete config flag "wayland-compositor"Johan Klokkhammer Helsing2016-04-011-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compositor is always built regardless of this config flag. Consequently some of the documentation and configuration was contradicting and confusing. * Removes the mentions of the flag from the README * Always build compositor tests * Always build plugins Update readme Change-Id: I37b7d1f0250beb17780834928114ecefdf17684e Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Merge remote-tracking branch 'qt/5.6' into 5.7Paul Olav Tvete2016-03-085-15/+11
|\| | | | | | | Change-Id: Iada0e076ee33e8d39ecc4f40edfd9764ba610c03
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-255-15/+11
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Ie9e89fa47696244e8ee478ed1a019765c835533e Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-209-126/+180
|/ | | | | | | | | | 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>
* Get rid of the egl config test and use what qtbase providesLaszlo Agocs2015-11-111-1/+1
| | | | | | | | | | | | | | | contains(QT_CONFIG, egl) and CONFIG += egl is the only sane way to test for and pull in EGL headers and libs. This is particularly important when trying to be robust and guard against half-broken sysroots on embedded where a naive PKGCONFIG += egl breaks. Also add an EGL_WAYLAND_BUFFER_WL define to keep wayland-egl compiling. We are not testing for that in any config tests may cause a failure in sysroots that have parts of Mesa thrown in but pick ip an older EGL header from the vendor's driver. Change-Id: I7b7e6a7a91e78dbda5b6954ad08761298c538efc Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-2/+0
|\ | | | | | | | | | | | | | | Conflicts: src/client/qwaylandshmbackingstore.cpp src/client/qwaylandwindow.cpp Change-Id: I795fd08f0fc5d3cb5ed55bf16e724f66b7567723
| * Remove useless EGL linking in pluginsOlivier Blin2015-03-271-2/+0
| | | | | | | | | | | | | | | | EGL libs are already linked from the hardwareintegration pri file, and the plugins do not make direct use of any EGL symbol. Change-Id: If6ecfee16e8c9d8fee67f03419941ced92d1eff8 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Update copyright headersJani Heikkinen2015-02-179-203/+131
| | | | | | | | | | | | | | | | | | 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-299-0/+40
|/ | | | | | | | | | | | 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>
* Remove deprecated method in brcm_egl pluginPier Luigi Fiorini2014-07-211-7/+0
| | | | | | | | QPlatformIntegrationPlugin::keys() was removed. This fixes brcm_egl build. Change-Id: I62af15a340a63794e6c6980ac6d72138d1cd60c8 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Take advantage of the Qt 5 plugin json structureJorgen Lind2014-03-116-63/+20
| | | | | | | | | | | Also change naming scheme of plugins: buffer integrations doesn't start with "wayland-" but the platform plugins have to start with "wayland-". Also update the README Change-Id: I6dd2103ab287ed569ab06cfb6eb469e3db058831 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fixup for GLX integrationJorgen Lind2014-03-113-7/+14
| | | | | Change-Id: I2de94481f7d3e109fdce7ca961f8969299cf5d9e Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fixup the brcm-egl hardware integrationsJorgen Lind2014-01-151-4/+5
| | | | | Change-Id: I2a25c7d0b5019c30f31cba1f608a8731be6b1f10 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Make classes in client privateJorgen Lind2013-12-273-3/+3
| | | | | Change-Id: Ibf400b32f78a6a0fcf0991914d2d9ad684483979 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Change constructor of QWaylandClientBufferIntegrationJorgen Lind2013-12-272-4/+6
| | | | | | | | | For QWaylandClientBufferIntegrations to be loadable from plugins the constructor shold not take any arguments, but give the display in the initialize function Change-Id: Ie38555120d7f29c6ba7eef0f095837235782684d Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Rename QWaylandGLIntegration to QWaylandClientBufferIntegrationJorgen Lind2013-12-274-80/+13
| | | | | | | also add a factory to load QWaylandClientBufferIntegrationPlugins Change-Id: Ia6a03627659b0452439ae664fceef21eaf0f6de0 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Move to new hardware structure for the platform pluginsJorgen Lind2013-12-2745-2961/+200
| | | | | Change-Id: I0d383e4cdd59c4e4eae5506c814f0c80ecbf58ae Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Move wayland into a client directory not under the plugins src folderJorgen Lind2013-12-2762-8436/+6
| | | | | | | | | And make wayland common files into a library, exporting all classes. Now there is no need to do bulild hacks to make your own version of the wayland plugin. Change-Id: Ib4872863dfb5ab3f2bc0f4a94ae16fc1e7b63b88 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Implement keyboard auto-repeatGiulio Camuffo2013-12-232-9/+49
| | | | | | | | | | Wayland does not send auto-repeat key events, so the clients must implement it themselves. The times used here are taken from Weston's toy toolkit implementation. Change-Id: I13ec7799672ee5ca2904c9b18ac5ec0c8816d6fc Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Fix decoration behavior when passing over with button pressedGiulio Camuffo2013-12-231-0/+1
| | | | | | | | | Fix the decoration resizing or moving the window when passing over it with the mouse button pressed, but which was not clicked over the decoration. Change-Id: If5d1d041ae6f80a07ce83bdca92dab35f721f2eb Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Wayland supports multiple windows.Shawn Rutledge2013-12-181-0/+3
| | | | | | | | | | After this, QtQuick.Dialogs for example will use widget-based dialogs instead of in-scene QML items. Change-Id: I3ada4c59fc6ae40d4eb6d3eb3bde70e546d96e6d Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Fix initialization of a text input manager pointerMichael Krasnyk2013-12-161-0/+1
| | | | | | Change-Id: I0a7494ea44c8b3179a9daf10efa6e00fa21fa491 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* QtCompositor: Allow key events to be delivered to unfocused windowsAndrew den Exter2013-12-162-22/+25
| | | | | | | | | Adds an overload to QWaylandInput::sendFullKeyEvent which allows specifying the surface to deliver the event to. This also extends the Qt keyboard extension to allow sending keys to specific windows. Change-Id: I1b7abdc4d8a30392ef2e7ee5e9af5b3036b23577 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* InputMethod extension fixupsAndrew Knight2013-12-161-0/+1
| | | | | | | | Add a missing slot decorator and a missing return statement. Change-Id: Iad7944b1b9d35ce45818d3be418dc897d7deed69 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Link against glib if necessary.Robin Burchell2013-12-111-1/+2
| | | | | | Change-Id: Ie0f87c24d15a6784cc9ed1201d3578ffbf94d191 Done-with: Carsten Munk <carsten.munk@jollamobile.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Pass full screen method constant name instead of valuePier Luigi Fiorini2013-12-101-1/+1
| | | | | | | Minor change but it makes the code more readable. Change-Id: I89206e519daec9c1d7fc2b5e716943396e6ea76b Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Build fix for platforms without xkbcommon.hDominik Holland2013-12-101-0/+6
| | | | | | Change-Id: Id08b16326575f93891e880afbe22dc034062a9af Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix the override of glBindFrameBufferObject when parameter is 0Jorgen Lind2013-11-282-6/+13
| | | | | | | and fix a couple of warnings Change-Id: I77b692ea66df0f692017c3d16660701c09297e1d Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QWayland-EGL: blacklist Mesa drivers from creating threaded GLAndrew Knight2013-11-252-2/+20
| | | | | | | | | | | As many Mesa drivers have been shown to have trouble with threaded GL, add this vendor to a threaded GL blacklist. This can be overridden by setting QT_OPENGL_NO_SANITY_CHECK in the environment. Change-Id: I75b72a35cbbf92e958c1e7846488b1455ecc72d0 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Wayland-EGL QPA: Support desktop OpenGL as wellAndrew Knight2013-11-253-6/+23
| | | | | | | | | There is no hard requirement on OpenGL ES 2 in this plugin, so allow Desktop OpenGL as well. Change-Id: I5b58f21c3640a4403dc6aa710838d4904d85f482 Reviewed-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Implement Drag&Drop support in platform pluginJan Arne Petersen2013-11-2216-530/+615
| | | | | Change-Id: I54d12c338fb6f07292e9e99f3a20fc4667a0e186 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Add support for text protocol to platform pluginJan Arne Petersen2013-11-228-5/+378
| | | | | Change-Id: I57b3efdc6f8200337afb58925b23896a8d8c7d1e Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Override QPlatformWindow::requestActivateWindowRobin Burchell2013-11-212-0/+8
| | | | | | | | | | | The default implementation assumes activation always succeeds, which might not be the case. The override is a no-op, making the window activation follow keyboard focus set by the compositor. Change-Id: I95c8cd03902a5eecd3dfbfffc338ab191e1c4f71 Done-with: Mikko Harju <mikko.harju@jolla.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Fixes for BRCM integrationRebecca Worledge2013-11-132-14/+14
| | | | | | | | | added a call to commit() after the flushBuffers, updated the buffer_release call to interate a single event queue. Removed the mutex and the wait condition. Change-Id: Icbde2fbb372ae319d0fbf9b4a9c98365102421a0 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* explicitly request wayland-scanner featureOswald Buddenhagen2013-10-214-0/+4
| | | | | | | | | having qtbase include it for everyone is wasteful, so do it here explicitly. Change-Id: I9bf39a48fe3323aaa5471a638760ac61a61de683 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Make the platform plugin compatible with qt 5.2.Giulio Camuffo2013-10-118-14/+15
| | | | | Change-Id: Ib81ae383c5ef4baf76f2cfd4bd9efeb749480f4b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Avoid dereferencing a null pointer when QMimeData is 0Andrew Knight2013-10-011-0/+4
| | | | | | | | | QClipboard's QPA implementation of clear() calls setMimeData(0, mode), which means mimeData can be dereferenced when it is null. Prevent this from happening. Change-Id: Ib019926e1a7c002d365419db609028c258d364bc Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Support application internal mouse grabbing for popup windowsGiulio Camuffo2013-09-203-7/+47
| | | | | | | | | | | | | | | | Mouse grabbing is used to close a popup window when the user clicks on another window. Wayland doesn't support mouse grabbing by design and sends an event when the user clicks on a window of another application. This patch fakes mouse grabbing for the windows of the application the popup belongs to, so that it closes when the user clicks on a window of the same application. Change-Id: Iac210bed0ca0fc6d3ffdbdb76d069886de51cf04 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Initialize more variableOlivier Goffart2013-09-202-0/+4
| | | | | | | Warning from valgrind. And I beleive this might also lead to crash on the first mouse click Change-Id: Iad6530aab358e29c510c5f46f8c9ae64d8e7287f Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Compositor: add BypassWindowManager hint to WindowFlagsAndrew Knight2013-09-201-1/+2
| | | | | | | | | BypassWindowManagerHint is already being used on the client-side, and it would be beneficial for some compositors to see this server-side as well. Change-Id: I4801a0c2f14f86fcd48cc49c3f2324af4216fb6f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Set surface title on platform window creationPier Luigi Fiorini2013-09-141-0/+3
| | | | | | | | | When creating the platform window, the surface title should be set to the value in the associated QWindow otherwise the compositor won't know it until setWindowTitle() is called. Change-Id: I5d0e16c78bf5dd7c9dde47254809d18cf77f0a82 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>