summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add a mechanism to delay unmapping of surfacesGiulio Camuffo2015-07-151-0/+3
| | | | | | | | | | When a client attachs a NULL buffer on a surface we may want to hang on to the old buffer for a bit, e.g. to do a hide animation. Add the QWaylandUnmapLock class to keep a surface mapped after an attach(0) request. Change-Id: I5d5be0b36410a76a58d2b68c1b2ac5e3b875a801 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Tests: Blacklist tst_WaylandCompositor::keyboardGrabCaroline Chao2015-03-301-0/+2
| | | | | | | | This test is currently failing in CI on Ubuntu 14.04. Task-number: QTBUG-45108 Change-Id: Ibb364171356f742e5a1f9818e0938bde5f2a8f76 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix the compositor testGiulio Camuffo2015-03-193-2/+10
| | | | | | | | | | | Output handling in the compositor changed, so update the test accordingly. As a side effect we now send an additional wl_output.scale event, so have the client handle it. Also the mapping between wayland's and QImage's format changed so make it succeed again. Change-Id: I66d32725c54d93ca1512a6a0ddaf466f58984afc Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Test: Fix compilation error in compositor testCaroline Chao2015-03-181-1/+1
| | | | | | | | The constructor takes 2 arguments. Change-Id: I4a6d231a163e896261d3c39e3625de07ce832ba2 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Update copyright headersJani Heikkinen2015-02-1720-441/+281
| | | | | | | | | 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>
* Merge branch '5.4' into devGiulio Camuffo2014-11-154-9/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 the compositor's wayland versioningGiulio Camuffo2014-10-094-9/+9
| | | | | | | | | | | | | | | | | | We cannot just assume all clients implement the same version of the various interfaces as the compositor does. Keep track of them, and react accordingly when creating a resource or sending an event. Change-Id: I9792433a14d49c5c4df0c892fc1349ce0dfb0d43 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Support for multiple input devicesMikko Levonmaa2014-10-208-0/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows the registration of multiple input devices for the compositor via private APIs. Since the Qt stack does not support separate input devices via the QPA, the identification of each device (wl_seat) is left up to the implementor. The compositor will identify input event via the QWaylandInputDevice::isOwner method. Usually this will happen when an item on the UI has received an event and would like to send it to the client surface. See QWaylandSurfaceItem for more details. Includes basic unit tests Change-Id: I7ee1db49388713bf3076c23cf8f8a165aefc2fe0 Reviewed-by: Mikko Levonmaa <mikko.levonmaa@lge.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-09-1910-56/+141
|\| | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwlcompositor.cpp Change-Id: Ica26e33eb2b77ed5be0e84e8f4256d2e85abfaf5
| * Fix QWaylandScreen geometry and physical sizeGiulio Camuffo2014-09-082-5/+13
| | | | | | | | | | | | | | | | | | | | | | The wl_output.geometry event carries the physical size of the output, not the logical one. This happened to work only because the geometry event was sent before the mode event, which carries the logical size. Moreover, use the done event to send only one geometry change event instead of one per advertized mode. Change-Id: I5b09d56654aac149d90692bb5a3e050cc0d60cb6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Fix crash of test clientLi Qiu2014-09-044-0/+60
| | | | | | | | | | | | | | No wl_data_device_manager created in Mock compositor Change-Id: If80f71165c28678f296bc18f0fea572dcb1a2f77 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Indicate from the client buffer integration if decorations are supportedLaszlo Agocs2014-08-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Custom client buffer integrations may not care about window decorations. Setting QT_WAYLAND_DISABLE_WINDOWDECORATION is tedious and error-prone. And it cannot be omitted since things like input events will be off if the common client code thinks decorations are in use but the client buffer integration does not render them at all. Therefore add a supportsWindowDecoration() virtual in addition to the environment variable. Change-Id: If8f621182d5c230f4d8d679c050f5d27aed6c2fb Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Make the test client more robust and make valgrind happyGiulio Camuffo2014-08-197-51/+63
| | | | | | | | | | Change-Id: I39ce667123391b946711cc2d16d12799e8b7dd2d Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Expose surface's client to QMLPier Luigi Fiorini2014-08-171-5/+7
|/ | | | | | | | | | | | | | | Introduce QWaylandClient class that wraps wl_client credentials and has a method to destroy the client. Add QWaylandClient object as a QWaylandSurface property. This come in handy for example when the compositor wants to kill the process of an unresponsive surface or wants to know client credentails. WaylandClient typedef is now useless thus is replaced by QWaylandClient. Change-Id: I997ec459af0f19baef67e7420c90937b197b2e1d Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix possible crash of the test clientGiulio Camuffo2014-08-151-1/+1
| | | | | | | The cursor surface is not in the surfaces list when destroyed Change-Id: Ie29224679776d0abec7862d2976be892c63521a7 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Fix client testsGiulio Camuffo2014-08-153-0/+19
| | | | | Change-Id: I6511dfb826c522db3d8bd01c5670c06f187abff2 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Fix compositor testsGiulio Camuffo2014-08-154-4/+22
| | | | | | | | | The test compositor was not updated after recent QtCompositor changes. Make sure to create and use wl_shell and fix the "repaint" loop in the frameCallback test Change-Id: I06515f114a3b7b755c22aef7d193d48fda94d7af Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Reset the wl_keyboard/wl_pointer resource pointers if destroyedGiulio Camuffo2014-08-132-0/+19
| | | | | Change-Id: I8693f845817d2dd4b0e0b54352c374f6a0e643d3 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Fix license test.Robin Burchell2014-08-132-4/+2
| | | | | | | Add missing copyright headers and fix existing (bad) ones. Change-Id: Ibbc6f3e996105305c8a2ed7d81ccee79795ee531 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Add cmake test for QtCompositor and disable cmake files for QtWaylandClientGiulio Camuffo2014-07-083-0/+22
| | | | | Change-Id: Id6e2d46b55e521218a3c0f44cf9a4a2be5f0df7f Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Add grab support for QtWayland::KeyboardMikko Levonmaa2014-05-066-2/+206
| | | | | | | | | Adds the possibility to grab the wl_keyboard interface, similar to pointer and touch grabs. Also includes basic unit tests Change-Id: I665df2ab5adfe16abd6b55f2d00cd9e6dc89d039 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Mikko Levonmaa <mikko.levonmaa@lge.com>
* Support configurable capabilities for input devicesMikko Levonmaa2014-04-292-1/+34
| | | | | Change-Id: I070f7daec8fb13a7db838b3d0c67e8aebc790a6c Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Rework the way buffers are used and renderedGiulio Camuffo2014-04-291-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | The current way buffers are handled is sub-optimal. They are hidden inside QtWayland::Surface and the actual renderer, be it QtQuick or anything else, cannot get a direct hold of them, nor it can directly control when the underlying textures are created or deleted. The main additions in this commit are the splitting of the QtQuick code path and the new QWaylandBufferRef and QWaylandBufferAttacher classes. QWaylandBufferRef allows a renderer to retain a reference to a wl_buffer even after the underlying Surface discarded it. That allows the renderer to directly decide when to destroy the texture of the buffer. QWaylandBufferAttacher is a pure virtual class which must be implemented by the renderer. Instances of it will be assigned to the QWaylandSurfaces, created. Its attach() virtual method will then be called when a new buffer is committed to the surface. The renderer can then choose to immediately create a texture or wait for some later time. It is its responsibility to create and destroy the GL texture, it will not happen automatically. This functionality is implemented for QtQuick in the new QWaylandQuickCompositor and QWaylandQuickSurface classes. Change-Id: I674b4e5fb8c65c3b1c582e33ff3a0b0e45f2acc9 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Merge remote-tracking branch 'origin/dev' into stableOswald Buddenhagen2014-02-191-1/+1
|\ | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwlsurface.cpp Change-Id: I3b6a4af41f272d3dc7fc920ba2542f2dd7978175
| * Merge remote-tracking branch stable into devAndy Nichols2014-01-092-1/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/compositor/hardware_integration/qwaylandclientbufferintegrationplugin.h src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp src/plugins/platforms/qwayland-brcm-egl/main.cpp src/plugins/platforms/qwayland-egl/main.cpp src/plugins/platforms/qwayland-generic/main.cpp src/plugins/platforms/qwayland-xcomposite-egl/main.cpp src/plugins/platforms/qwayland-xcomposite-glx/main.cpp Change-Id: I957c9bee893a9e19fc8c93f0e51292007fb3a4a8
| * \ Merge remote-tracking branch 'origin/stable' into devAndy Nichols2013-09-097-221/+332
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qtwayland.pro src/plugins/platforms/wayland_common/qwaylandshellsurface.cpp src/plugins/platforms/wayland_common/qwaylandshellsurface.h src/plugins/platforms/wayland_common/qwaylandwindow.cpp src/plugins/platforms/wayland_common/qwaylandwindow.h Change-Id: Ifa9bc553d826b893b054bbaef5ea3fc3013de3df
| * | | client test also needs compositorOswald Buddenhagen2013-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I596e3a4a9f4db8e4b0559573d7a33671c0bc366a Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* | | | Make the compositor test buildGiulio Camuffo2014-02-091-1/+1
| |_|/ |/| | | | | | | | | | | Change-Id: Ic4137ff7f69b293db60fa1232602cd4560497d6e Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | | Include wayland-client with < and not "Jorgen Lind2014-01-091-1/+1
| | | | | | | | | | | | | | | Change-Id: Ida61437bb76c81ee2af57856d9be9694e2fdb4a4 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | | explicitly request wayland-scanner featureOswald Buddenhagen2013-10-211-0/+1
| |/ |/| | | | | | | | | | | | | | | 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>
* | Use QMultiMap instead of wl_list for resourcesJan Arne Petersen2013-08-281-20/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change generated code in qtwaylandscanner to generate resourceMap() methods returning a QMultiMap<wl_client*, Resource*>. Adapt code using resource lists to use the map instead. Remove Compositor::resourceForSurface(). Change-Id: Id41a1712f9c2477c1a1af843bba2795dd90391e5 Reviewed-by: Andy Nichols <andy.nichols@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | Make test compile with Wayland 1.2Jan Arne Petersen2013-08-227-139/+288
| | | | | | | | | | | | | | Tests still fail when running like before. Change-Id: I9c0a5e8068fa7af7abc0018e6e9c4f08aa39533b Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* | Update tests so that it does not deadlockJørgen Lind2013-08-025-93/+73
|/ | | | | | | still failes though Change-Id: I7978c752b02f32a2e2c587c0ad674c51c5e0ad22 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Qt-ify the QtCompositor moduleAndy Nichols2013-02-083-14/+14
| | | | | | | | | | | | | | | | | | | | Currently the QtCompositor library and API do not follow the Qt API naming conventions. This commit intends to fix these inconsistencies. filenames start with q headers containing private API's end in _p public API classes begin with Q use the qt namespace macros where necessary Wayland namespace is now QtWayland wayland_wrapper classes are now private API's It's important to make these changes not just for stylistic reasons, but also because when qmake builds the module in checks for these conventions to determine how to deploy the include files. Change-Id: I8bfadeceda92a0f52cb73c704551da75540e7587 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Don't build QtCompositor unless explicitly enabledAndy Nichols2013-02-051-1/+7
| | | | | | | | | | | | | The QtCompositor API is to be considered experimental in Qt 5.1 and thus it should be disabled from being built by default. If the qmake variable CONFIG contains "wayland-compositor" then the QtCompositor API will be built. Change-Id: If10f5a688749f31338a80be45bbec22a0f2d12da Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Update tests to build with wayland 1.0.0Andy Nichols2013-01-292-13/+20
| | | | | | | | | We still fail the same compositor tests, and seg fault at the begining of the client test, but this is the same behavior as with 0.95 Change-Id: I2c1af65be4239663f99848b1574d9cc88b4a5d97 Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2513-314/+314
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie65cbe0c622780d2f0672bce19d267d1167620ff Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Update Wayland SHAJorgen Lind2012-08-173-3/+5
| | | | | Change-Id: I3a0adb4b935282b9bb421a87dc8241d6ea8271f0 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Compile fixesJorgen Lind2012-08-131-0/+1
| | | | | Change-Id: Ie532b5cd87dbcb9546b23c2ce7d013137933fbb8 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Introduce standard pkg-config usageDonald Carr2012-06-112-48/+8
| | | | | | | | Use our own qualified pkg-config mkspec feature rather than directly executing the system binary Change-Id: I4b162cd8d2d9a8bd5d0b3adb9ca935df9ff96a69 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Migrate from wl_input_device to wl_seatLaszlo Agocs2012-05-203-33/+96
| | | | | Change-Id: I0d218c32478c2acce4d7012bdb26b0cde50ee633 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Implemented refresh rate support.Samuel Rødal2012-05-091-1/+2
| | | | | | | | | | | Implements QWaylandScreen::refreshRate() based on the wl_output mode information we get from the compositor. In the compositor, adds API to override the refresh rate, with the default set to whatever QScreen reports on the compositor-side. Change-Id: I5f5175f2498940875c6ec68d29d25cf5993a1e65 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Start using the new wl_fixed_t type properlyLaszlo Agocs2012-05-091-2/+4
| | | | | | | | | | | | | | The mouse and touch coordinates cannot just be treated as integers anymore, they need to be converted from/to double using the helper functions. Some necessary QPoint -> QPointF changes have also been made. For the Qt-specific touch extension we will not switch to wl_fixed_t though. This is because the precision is unfortunately quite small (factor of 256 vs. 10000). Change-Id: I23deaaffe478a39495b12d336985bc62e38a6af4 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Update to wayland headLaszlo Agocs2012-05-091-1/+31
| | | | | Change-Id: Ie012861bc40e3bc448d85c9d8c27f798434020ed Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Sync up with the latest wayland developments.Hannu Lyytinen2012-04-194-15/+22
| | | | | | | | | | This commit makes the qtwayland module compatible with wayland sha1 677c5180e67be18b7a0867fafb7f205b57a6e9ff. Change-Id: I5af0510034b7e4a038313b80f1f6e0b18fa48eb3 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Updated SHA-1 in wayland_sha1.txt to one against which qtwayland builds.Samuel Rødal2012-04-111-1/+0
| | | | | | | | | | Prevents following error: wayland-util.h:152: error: ‘size_t’ does not name a type Some <string.h> includes are also not necessary any more. Change-Id: I0846948ba32d32521b0749b616eea3cad0ed3383 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Update wayland_sha1 and implement buffer_pool interfaceJørgen Lind2012-04-108-169/+18
| | | | | Change-Id: I0628a7655a6deb061a5d0b6c6304c89d8655cf11 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed mockshell error in client auto testAndy Nichols2012-03-301-1/+1
| | | | | Change-Id: Ibcb6bd807d281fbc14c35c98f4dabd4d7f82077b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Introduced WaylandClient API to keep track of clients.Samuel Rødal2012-03-291-0/+27
| | | | | | | | | Makes it easier to keep track of which surfaces belong to a given client, and the client associated with a given surface. WaylandClient is an opaque type, representing an underlying wl_client *. Change-Id: If21a2e02eb13a860e6ac641875bdcca67a53fdf5 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Make the module not depend on QtBase configureJørgen Lind2012-03-122-19/+42
| | | | | | | | This is convenient if we want to reconfigure without reconfiguring QtBase. Change-Id: I719ba0d89905287a557e962ed6d804514e44b7f5 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>