summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Constrain window geometryAndrew Knight2013-09-122-6/+8
| | | | | | | | | | | It is the platform plugin's responsibility to constrain window geometry to QWindow::minimumSize/QWindow::maximumSize. Platform subclasses should make sure to call the setGeometry() base method first to make sure geometry() has been constrained before continuing to resize surfaces. Change-Id: I1c25ba6a32a3597603a3ffdb799b4e22b9d8f3ec Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Set window state on platform window creationAndrew Knight2013-09-121-1/+1
| | | | | | | | | | | | When creating the platform window, the window state should be set according to the value in the associated QWindow. This is especially important for new QWindows, as the application may expect the compositor to resize e.g. maximized or fullscreen surfaces. Change-Id: I9cf4eb810bb4fa6305da4206c9a2cec0247c2fe6 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Just exit instead of asking the application to quit when the connection goes ↵Robin Burchell2013-09-122-7/+13
| | | | | | | | | | | | | | | | | | | down. As discussed in abe1be628da687b1943a41e5411f34f646aeca86, the existing approach is ineffective in some cases in that it merely requests that the application shut down. In the case of misbehaving threads (for example), the application can sit around indefinitely instead of quitting as it should. Additionally, add a warning to make it clear what happened. This also matches up with the xcb plugin's behavior. Change-Id: Iabc17dc268c849635263a16754b9f3bfa7bd9e4a Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Allow to set a fixed DPI for the screenJan Arne Petersen2013-09-102-0/+11
| | | | | | | | | | When the QT_WAYLAND_FORCE_DPI environment vairable is set use that value for Dpi. Needed in some cases for font matching. Change-Id: Ia02ec4743894d41a18471e6cbcca764da45a6844 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Add missing errno.h includeJan Arne Petersen2013-09-101-0/+2
| | | | | Change-Id: I17655fbd86aee6b135bd02df140dd4cd2e253a43 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Wayland platform: Do not crash when opening a popup without the mouseLaszlo Agocs2013-09-101-1/+2
| | | | | | | | | set_popup requires a wl_seat which we will not have if the mouse has not been touched. Avoid set_popup in this case, otherwise all we get is a crash. Change-Id: I591b218c18e3812cdc5fb86e8bf8b92caf64a4f6 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Compositor: Fix refresh rateAndrew Knight2013-09-091-1/+1
| | | | | | | | | | | Wayland output defines refresh rate in millihertz (int) while Qt uses Hz (float). Make sure all integer APIs are using millihertz, and covert Hz values to mHz when passing from Qt. Change-Id: I5886f5618680d99db6fc106dd7b8998b00a2face Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Delete the frame callback when destroying a windowGiulio Camuffo2013-08-271-0/+2
| | | | | | | | | | Not destroying the possible frame callback may lead to a crash when calling wl_display_dispatch(), besides leaking memory. Change-Id: Ida9f04322112673f4c1a8f3ab5a85c7c9d489dd3 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Quit when the wayland socket is closed.Giulio Camuffo2013-08-222-3/+7
| | | | | | | | wayland-client sets errno to EPIPE when the wayland connection is closed (int read_events(wl_display*) in wayland-client.c). Change-Id: Ifc984edf2fa018460f783a3af39c02ff08164860 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Fix transient and popup windows with the parent without a shell surfaceGiulio Camuffo2013-08-221-2/+2
| | | | | | | | | Transient and popup surfaces may have the parent without a wl_shell_surface, if the parent has the Qt::BypassWindowManagerHint flag set (like for surfaces used for special purposes by a shell), so make them work anyway. Change-Id: I20592a95b0a508a19506c9ea21ec44f9df5be9fb Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Fix key handling.Giulio Camuffo2013-08-221-20/+64
| | | | | | | | | | | Use the keymap sent by the compositor and improve the way the text and the Qt::Key of the keysym is calculated, making the keypad work. Change-Id: Icc4667dab0649ce47792c512fbcaa0193e2ffd45 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Generic Wayland platform themePier Luigi Fiorini2013-08-223-3/+54
| | | | | | | | | | | | | | | | | | | | | In 10652f8dd675aa0d12c11597c165831c8ba0b8b4 we disabled desktop settings awareness because it caused some problems like the GTK+ style being loaded even though it has X11 dependencies. Unfortunately this prevents the platform theme plugin from being loaded even for desktops that currently support Wayland. So the idea is to wrap the generic platform theme around a Wayland implementation that prevents platform themes for X11 desktop environments from being loaded without consequences for desktops supporting Wayland. When more desktop environments will support Wayland it's worth reconsidering how the platform theme plugin is loaded. Change-Id: I0d683bfe491c9421acdb87a8e8f05d99de1ff21f Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>