summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddisplay.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Add QWayland::shm object to clientMikko Levonmaa2015-09-251-1/+1
|/ / | | | | | | | | | | | | | | | | | | Allows more flexibility for the client to determine additional shm formats supported by the compositor in addition to the standard types. For example YUV formats. Change-Id: Ib4a47c1d5bbeed9314d5ad5f5f8e1551c1dd71e4 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Mikko Levonmaa <mikko.levonmaa@bitfactor.fi>
* | Use standard wl_subsurface interface to set a window as a child of another oneGiulio Camuffo2015-07-221-3/+12
| | | | | | | | | | Change-Id: I52628f87dbea5383db06468f9748a9bacdec3179 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-291-0/+3
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ic75157b11eee188608c3ac7ed6fb1a033bb72750
| * Fix input devices leak in clientOlivier Blin2015-06-121-0/+3
| | | | | | | | | | Change-Id: I28200698706168308e450b2cd3cfa99df517f9b7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-031-0/+6
|\| | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwloutput.cpp Change-Id: I05f7431aca46760f90632dfa7ef9c4d0abf392ec
| * Fix crash when the wl_shm global comes after a wl_output oneGiulio Camuffo2015-05-281-0/+1
| | | | | | | | | | | | | | Task-number: QTBUG-44503 Change-Id: I6932df57bb4560b6dceb72a5cb7c536cd090e92a Reviewed-by: Martin Gräßlin <mgraesslin@kde.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Track last input window with a QPointer in case it is destroyedArnaud Vrac2015-05-071-0/+5
| | | | | | | | | | Change-Id: I61d7aa4b6a37922eb3beefd983154ee267cae0ef Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Remove output extensionPier Luigi Fiorini2015-05-061-6/+0
|/ | | | | | | This protocol is empty now and is no longer used. Change-Id: I45e79fb86a67b4cebdc307170218fa039b2aa27f Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-201-2/+9
|\ | | | | | | Change-Id: I03fd08fc0576ffac813f64905c23de4d65e67433
| * Run eventDispatcher in QWaylandDisplay::forceRoundTripMartin Gräßlin2015-02-171-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the application uses QCoreApplication::setEventDispatcher before the QGuiApplication is created the blocking roundtrip might block the application indefinitely. This can happen if the application starts a Wayland server in the same process before the QGuiApplication is created. And the QtWayland plugin connects to this server. In this case a roundtrip blocks as the Wayland server cannot process the events the QWaylandDisplay is waiting for. By running the event dispatcher manually and using the pending variant for dispatching the Wayland event queue, the application can be kept alive. Change-Id: I9c36fccbae8921e1ae9a0a8b7f460520b1b65d5c Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.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>
* | Fix buildGiulio Camuffo2015-02-171-0/+2
| | | | | | | | | | Change-Id: I790e9bfbcffc7458e2a46f2da32dcbde0c6bffe8 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-161-0/+8
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddataoffer.cpp src/client/qwaylanddisplay.cpp src/client/qwaylandinputdevice.cpp src/client/qwaylandwindow.cpp src/compositor/compositor_api/qwaylandsurfaceitem.cpp Change-Id: I2eae0fd43a71fbfd7c907ca715707a26f3c134c5
| * Sanitize popup behavior.Laszlo Agocs2015-02-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Popups are pretty important for widget apps. Menus, combobox dropdows and such are all popups. Currently they are completely borked when activated via keyboard or touch. This is because of the bizarre set_popup request in the protocol, and Weston's current implementation, that ignore the fact that a popup can be opened as a result of a keyboard event too or may not originate from an input event at all. Pass the last input device and serial we have seen, regardless of the type, by tracking it globally in the QWaylandDisplay. With this patch menus and such will not freeze the application anymore when activated with keyboard or touch without sending a mouse event to the window first. The behavior is still broken in some ways, especially with keyboard due to immediately getting a popup_done, but at least applications remain usable. Task-number: QTBUG-41142 Task-number: QTBUG-41147 Change-Id: I18de501004ae8a62ff8667e72225d08c2d3ba491 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@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>
* | Make use of the new QPlatformIntegration::destroyScreenGiulio Camuffo2014-12-291-2/+4
| | | | | | | | | | | | Task-number: QTBUG-41141 Change-Id: I0bd789cc1090f7e0e7615b47c33a4e4179677398 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Merge branch '5.4' into devGiulio Camuffo2014-11-151-7/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Be compatible with older compositorsGiulio Camuffo2014-10-131-3/+4
| | | | | | | | | | | | | | | | When binding globals take care of the version the compositor provides and don't call requests that the compositor doesn't implement. Change-Id: Iea0c534fb9e005720857e2778e380b6a9c22a6f3 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Call ::exit() from the gui thread onlyGiulio Camuffo2014-10-021-4/+14
| | | | | | | | | | | | | | | | ::exit() is not thread safe, so make sure to not call it more than one time, once from the gui thread and once from the wayland event thread. Change-Id: I80905c6d996cb827a5101ae6d6c9bc12a267ba71 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Allow client side input device customizationMikko Levonmaa2014-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-09-191-19/+40
|\| | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwlcompositor.cpp Change-Id: Ica26e33eb2b77ed5be0e84e8f4256d2e85abfaf5
| * Fix window decorations for GL appsLaszlo Agocs2014-09-061-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | You cannot have rounded corners with an alpha-less config. To make OpenGL applications appearing with the correct decoration, alpha must be enabled. With this fix the OpenGL apps' decoration will now look identical to the SHM apps'. Change-Id: I24431ddab63146f7f697c85277f00f41e5c55e85 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Advertise new screens created after startupGiulio Camuffo2014-09-061-1/+3
| | | | | | | | | | Change-Id: I995f49e52ec888830b478f1e1f9cc82132776725 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Destroy the QScreen when its wl_output is removedGiulio Camuffo2014-09-041-1/+11
| | | | | | | | | | | | Change-Id: I4532d05cca44c88fe38c14eacbe90c190f272b2c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Explicitly define the interface versionsGiulio Camuffo2014-08-231-6/+6
| | | | | | | | | | | | | | | | | | | | Currently a global is bound with the version the interface has in the xml file. This is a problem for apps that explicitly link to libwayland-client because they may link to a newer libwayland, so the version of some interface may be higher than the one that it is actually implemented. Change-Id: Id0dbe6c0f1e05fe91954b9d8d9472d42d2053cdc Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * QWaylandDisplay: Centralize error handling in one place.Robin Burchell2014-08-191-20/+4
| | | | | | | | | | Change-Id: Ifba23e349a4006cea501480a7230408f0fafd1b7 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * QWaylandDisplay: Correctly intercept all errors when dispatching.Robin Burchell2014-08-191-4/+17
| | | | | | | | | | | | | | | | | | | | | | A connection reset isn't the only form of error we may run into, so make sure we check for other exceptional circumstances through wl_display_get_error. This fixes my case of e.g. wl_drm throwing an error but QtWayland never quitting the client. Change-Id: I8c76dd7913640e58d03bd2fe52eb054a4daa0235 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * QWaylandDisplay: Destroy screens when destroying the display.Robin Burchell2014-08-181-0/+2
| | | | | | | | | | | | | | Fixes a crash in tst_QApplication. Change-Id: Ibfc7aded10609cff9c7a20b7193f44d1c73bc893 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * QWaylandDisplay: Remove unused static.Robin Burchell2014-08-181-3/+0
| | | | | | | | | | Change-Id: I868168dee716103962217b5ceb38185090f82e09 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Add support for setMask to set input regionJan Arne Petersen2014-08-131-0/+10
|/ | | | | | | | Also fix input region handling in compositor. Change-Id: If88ad6a03443526eddee045d7af54daf5057373a Done-with: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Add a way to have out of source shell integrationsGiulio Camuffo2014-08-071-0/+17
| | | | | | | | | | | | | | | | | | Some platforms (especially non-desktop ones) may use a custom Wayland shell extension, more tailored to the form factor than the generic and desktoppy wl_shell or xdg_shell. Instead of stuffing N protocol implementations in the QPA plugin use a plugin architecture to allow them to live out of tree. When creating a shell surface the QT_WAYLAND_SHELL_INTEGRATION env variable will be checked, and if it points to a valid plugin that will be used to create the shell surface, falling back to wl_shell or xdg_shell if no plugin is specified. Change-Id: I05019174bb915199dd726f5fdcc0385ef846e8de Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Philippe Coval <rzr@gna.org> Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Wait to get wl_output's events before creating surfacesGiulio Camuffo2014-08-051-0/+2
| | | | | Change-Id: I2eb4b40a4b8b1de7990d06b57b0d7a7b04ee9657 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Make sure to have a hardware integration when creating windowsGiulio Camuffo2014-08-041-4/+31
| | | | | | | | | | We need to do a full roundtrip and wait for the qt_hardware_integration global before returning from QWaylandDisplay constructor. Waiting for the screen is not enough, since there is no guarantee it will come after the hardware integration global. Change-Id: I34cb50b830632db7e5d5c7a502eeef778599b267 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Resolve build warning on client codePier Luigi Fiorini2014-08-011-1/+1
| | | | | | | | QString::QString(const char*) is deprecated, wrap thread name with QStringLiteral. Change-Id: Ic914d05e7bee6e3f1c6aa0bede44a6b6b85be565 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Give a name to the event handling threadGiulio Camuffo2014-07-211-0/+1
| | | | | Change-Id: I5c6073bc1908e54bc5ae50d4b6b6044974f1ad60 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Delete data device manager while display is still alive.Gunnar Sletta2014-06-271-0/+1
| | | | | Change-Id: I7691e06d75866034c93020ebdfb45421275fcf9d Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* xdg-shell: upgrade to support current version (weston-1.5.0)Philippe Coval2014-06-201-3/+7
| | | | | | | | | | | The protocol file is a raw copy of Source: http://cgit.freedesktop.org/wayland/weston/plain/protocol/xdg-shell.xml?id=1.5.0 Task-number: QTBUG-38633/related Change-Id: I41ca2f89c09a8b6348ce2fbf6d59f44b4c8134df Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Philippe Coval <rzr@gna.org>
* Add minimize feature to QWindow using wayland's xdg-shellPhilippe Coval2014-06-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The feature is disabled by default, and can be enabled at runtime by exporting QT_WAYLAND_USE_XDG_SHELL env variable. This patch relies on presence of protocol file which has been imported from weston-1.4.0 sources, until the xdg-shell is merge into wayland itself. Because xdg-shell is experimental, code fallback to WaylandShell if no XdgShell but keep in mind those shells are exclusive. Since xdg-shell and wayland-shell share most of the API, some factorization is done by an (empty) abstraction class to keep the code more readable. Despite xdg-shell introduces new popups concept, they're not used on this change for maitainance purpose. Notes: * This change depends on presence of xdg-shell protocol file. * You can check a demo video (qt-tizen-cinematic-experience-20140430-rzr) of the test case at : https://www.youtube.com/watch?v=pY_XXvKc_0E# * Use Super+Tab to show window again if hidden Task-number: QTBUG-38633/part/2of2 Change-Id: I2d7ed85bea1847d82439fdfc893a3dbb2581c14a Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Always bail out when the compositor is closedGiulio Camuffo2014-04-011-2/+2
| | | | | | | | errno can both be EPIPE and ECONNRESET when reading from the connection after the server is closed. Change-Id: I03b64a382db3de66819277e9955aeca3e2d7f9a1 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Send the globals to new listenersLaszlo Agocs2014-01-161-7/+21
| | | | | Change-Id: I8d2a74cdc305fb086f3b5c63d0abe4c46c40bbde Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Make classes in client privateJorgen Lind2013-12-271-20/+20
| | | | | Change-Id: Ibf400b32f78a6a0fcf0991914d2d9ad684483979 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Use QScopedPointer in QWaylandDisplay for extensionsJorgen Lind2013-12-271-11/+11
| | | | | Change-Id: I783639fcefd36967f42f18417b0e07ec34b49dbb Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Add hardware integration protocolJorgen Lind2013-12-271-1/+4
| | | | | | | | | | This sends to clients what HW integration is being used in the compositor. This is useful when the wayland clients are loading their buffer integrations with plugins since they then can pick the correct plugin automatically. Change-Id: Ib4eac3b855c6772ac1581b7f06aa929aeb1a1db0 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Fix compiler warningsJorgen Lind2013-12-271-1/+1
| | | | | Change-Id: I499c50c901bff1c496b05b628f8155376b5af267 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Remove compiler warnings in client.Jorgen Lind2013-12-271-11/+11
| | | | | Change-Id: Iedd2e53aa8d6c8d09272175e402e64bdb40acb36 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Rename QWaylandGLIntegration to QWaylandClientBufferIntegrationJorgen Lind2013-12-271-3/+3
| | | | | | | 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-271-24/+8
| | | | | 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-271-0/+272
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>