summaryrefslogtreecommitdiffstats
path: root/tests/auto/compositor
Commit message (Collapse)AuthorAgeFilesLines
* Use the feature system internallyLars Knoll2016-11-231-4/+1
| | | | | | | | | Get rid of almost all DEFINES += ... in the pro files, instead use the proper QT_CONFIG() macro to determine whether a feature is available. Change-Id: I867769be2085c6ba93b6815e223e2b89edcb245d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Move qtwayland over to use the new configuration systemLars Knoll2016-11-231-11/+3
| | | | | | | | | | | | | 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>
* Add mode support to QWaylandOutputPier Luigi Fiorini2016-10-033-7/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Outputs usually have more than one mode, add an API to support them. When sizeFollowsWindow is true, modes are replaced by one with the window size and refresh rate. In that circumstance the mode changes when the window is resized. The sizeFollowsWindow property default value is no longer true. The setGeometry() method is gone as it doesn't make sense now, the setWidth() and setHeight() methods are now private slots to resize the resolution as the window resizes (and sizeFollowsWindow is true). Refresh rate is expressed in mHz rather than Hz just like the Wayland protocol. A compositor implementation may choose to add modes if it has access to hardware information, it will call addMode() for each mode and then invoke the setCurrentMode() method that sends the modes list to the client. The preferred mode is indicated with a boolean parameter to the addMode() method. Change-Id: Iffed4784ccef695c276ebd800172957f4cff3324 Task-number: QTBUG-49814 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Make QWaylandKeymap a QObjectJohan Klokkhammer Helsing2016-09-302-5/+6
| | | | | | | | | This makes it possible to use defaultSeat declaratively by allowing it to be uninitialized until the QWaylandCompositor::create has been called. Change-Id: I962cc7cc82a0bbc9240abb50cf92dee77e4a0ba6 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* C++ API and tests for the ivi-application extensionJohan Klokkhammer Helsing2016-09-304-1/+192
| | | | | | | | | Note, this is only an implementation of the ivi-application extension, not ivi-controller which contains layer management interfaces. Task-number: QTBUG-53149 Change-Id: Ic5a31156de1768f846b714a9aee9bbf8a945cbbe Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Rename QWaylandView::attach() to bufferCommitted()Paul Olav Tvete2016-09-081-1/+1
| | | | | | | | | | The old name was wrong on two counts: first of all, the function is called on wl_surface.commit, not attach. Secondly, the imperative tense made it look like a function that can be called by the user. Change-Id: Icd872d430062e67154bd50ca7d79881ea9874152 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* Rename the QWaylandXdg* classes to QWaylandXdg*V5Giulio Camuffo2016-09-051-26/+26
| | | | | | | | This frees the QWaylandXdg name for the hopefully coming stable version of xdg-shell. Change-Id: I9beb9b035c6497fb45bee5c9104485b564ca0619 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Merge remote-tracking branch 'qt/5.7' into 5.8v5.8.0-alpha1Liang Qi2016-08-2814-37/+42
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/compositor_api/qwaylandseat.cpp src/compositor/compositor_api/qwaylandview.cpp tests/auto/compositor/compositor.pro tests/auto/compositor/compositor/testinputdevice.cpp tests/auto/compositor/compositor/testinputdevice.h tests/auto/compositor/testinputdevice.cpp tests/auto/compositor/testinputdevice.h tests/auto/compositor/testseat.cpp tests/auto/compositor/testseat.h Change-Id: I98e045908dd964e5d4120bd35e71b8839c0d923a
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-2314-37/+42
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/compositor/compositor.pro tests/auto/compositor/compositor/compositor.pro Change-Id: Id9f3cf97ca3b600bdafba846908643ff0f8964b9
| | * Fix autotest directory structurePaul Olav Tvete2016-08-1914-33/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | The client and server parts are separate modules, so they need separate top-level directories under tests/auto. This also makes it easier to add new tests later. Change-Id: I393341b6f4e8fc3afa480653f3482192e002e425 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | | Rename QWaylandSurface::isMapped to hasContentJohan Klokkhammer Helsing2016-08-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was potentially misleading, since "mapped" is already used with a slightly different meaning in the Wayland protocol. In the protocol, mapped means that the surface should be rendered. The renamed property, on the other hand, is true if the surface has a buffer with contents attached and committed. In some cases this is not the same, i.e. the drag icon after dropping, or xdg_popups after popup_done. Change-Id: Idc359433c6130e3815de57b21d4edb13e318887d Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | | Compositor API: rename QWaylandInputDevice to QWaylandSeatJohan Klokkhammer Helsing2016-08-118-53/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name QWaylandInputDevice could be confusing and misleading: - A QWaylandInputDevice was not one input device, but a collection of many. - Classes that sounded like they should inherit from it did not, i.e: QWaylandKeyboard, QWaylandPointer and QWaylandTouch. - The Wayland protocol already has another term for this, which is seat. Change-Id: I9d9690d5b378075d9dddaeb8cf18395c7f47603e Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | | Rename sendUnMaximized to sendUnmaximizedJohan Klokkhammer Helsing2016-07-121-2/+2
| | | | | | | | | | | | | | | Change-Id: I20add5c8b12e1345ce50c009d8bae80fde9806e1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Compositor: Rename shm to sharedMemoryJohan Klokkhammer Helsing2016-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | sharedMemory is much clearer and will increase the readability of the code and API. Change-Id: Ibb6d7424fa8d44a94a0f4ddf476a564eb235323f Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | | Rename xdg surface request<state> methods send<state>Johan Klokkhammer Helsing2016-05-311-7/+7
|/ / | | | | | | | | | | | | | | It could be confusing to have methods that cause Wayland events to be named request*. Change-Id: I6567f9e8fd9370e574516e97cd49858e2bf34829 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Fix test buildPier Luigi Fiorini2016-04-211-0/+2
| | | | | | | | | | | | | | Compiler cannot find wl_display_flush_clients() due to missing include. Change-Id: Ia703d100b9e509f7666580d50cca9b8ac44b656b Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Compositor-api: Test for xdg_shell::configure eventJohan Klokkhammer Helsing2016-04-183-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | Tests basic functionality for QWaylandXdgShell::sendConfigure as well as convenience functions and related edge cases (i.e. activated state should remain unchanged when setting maximized). Also verifies that ack_configure sets property values to the configure event values with the corresponding serial. Change-Id: Ifc7e107e46d25a529823360acc3befbf060e6f19 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Add basic tests for xdg-shell compositor APIJohan Klokkhammer Helsing2016-04-114-5/+114
| | | | | | | | | | | | | | | | | | | | | | | | Tests the following functionality: * xdg_shell can be found and bound using the registry * xdg_surfaces can be created * window geometry is handled correctly (not including subsurfaces) * app_id Change-Id: I76942da2b245f91fe567059e175fe9ceb98edb6a Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-081-0/+2
|\| | | | | | | Change-Id: I31f4c29c985301d28d5c8d0501761c7d4fb7fda6
| * fix namespaced buildOswald Buddenhagen2016-04-061-0/+2
| | | | | | | | | | Change-Id: I69c8fa49baebc29d8a22426394ce0a72627b9ad6 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Rename compositor Shell to WlShellJohan Klokkhammer Helsing2016-04-052-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * QWaylandShell -> QWaylandWlShell * QWaylandShellSurface -> QWaylandWlShellSurface * QWaylandQuickShellSurfaceItem -> QWaylandQuickWlShellSurfaceItem * Shell -> WlShell (QML) * ShellSurface -> WlShellSurface (QML) * ShellSurfaceItem -> WlShellSurfaceItem (QML) This is done to avoid confusion with XdgShell and will hopefully help clarify that some of the examples only support wl_shell and not xdg_shell. Additionally, this makes "Shell" an available name in the compositor API, which may in turn enable the creation of a more general abstraction hiding the details of the shell backends (i.e. xdg_shell, wl_shell, and eventually ivi_shell). Change-Id: Iebac1f36505084bfaaea68838005d54db6c55e21 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Set socket name for TestCompositorJohan Klokkhammer Helsing2016-04-032-1/+1
| | | | | | | | | | | | | | | | | | | | | | Tests did not pass because WAYLAND_DISPLAY only affects clients, not compositors. Compositor display name can be set either using the command line argument "--wayland-socket-name" or QWaylandCompositor::setSocketName. The latter was chosen here. Change-Id: I524b5c92ec9959486373875850b4f192b62423e0 Reviewed-by: Erik Larsson <erik@ortogonal.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Fix incorrect function signature in compositor testJohan Klokkhammer Helsing2016-03-312-3/+3
| | | | | | | | | | | | Change-Id: I64174607a48b50c8371f53699568a96474dc10c6 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Erik Larsson <erik@ortogonal.com>
* | Test: Make compositor tests runnable with new APIErik Larsson2016-03-218-133/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix compilation errors and make all compositor tests runnable with the new compositor API. Some input handling tests are reworked so they are able to function with the new compositor API. Also make sure client and cmake tests are built even if not compiled with a wayland-compositor. Change-Id: I0f03e2c04f2736860f770b6100ccfa3300ff8da4 Reviewed-by: Johan Helsing <johan.helsing@theqtcompany.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Updated license headersAntti Kokko2016-01-2011-187/+132
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: Ifa334d2d3487e413e90ba9f2bf377026076b2df1 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Rename QtCompositor to QtWaylandCompositorJørgen Lind2015-09-101-1/+1
|/ | | | | | | enable building QtWaylandCompositor by default Change-Id: I7cf34052b304ca9fef55b7e30ef6a6367b5d75f1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* 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-1711-243/+155
| | | | | | | | | 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>
* 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-192-5/+13
|\ | | | | | | | | | | | | 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>
* | 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 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>
* 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 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>
* 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>
* 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>
* 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-255-122/+122
| | | | | | | | 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-172-2/+4
| | | | | Change-Id: I3a0adb4b935282b9bb421a87dc8241d6ea8271f0 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Introduce standard pkg-config usageDonald Carr2012-06-111-25/+4
| | | | | | | | 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>
* 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-102-2/+6
| | | | | Change-Id: I0628a7655a6deb061a5d0b6c6304c89d8655cf11 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>