summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-181-0/+37
|\ | | | | | | Change-Id: I6c201769561f53d88c89f75cce7d9a7b2643d2f6
| * Don't recreate hidden egl surfacesDavid Edmundson2018-01-161-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWaylandEglWindow deletes surfaces when a window changes from hidden to visible, presumably as a result of us not having a valid wl_surface object. By extension it doesn't make sense to create a surface whilst a window is still hidden. This fixes a crash where a QQuickWindow hides and then is destroyed. In QQuickWindow destruction we have to create a valid context in order to delete any textures/assets owned by the scene graph; as the wl_surface has gone this causes an error in the EGL libs when we create an EGL surface. Task-number: QTBUG-65553 Change-Id: I9b37a86326bf2cd7737c4e839c1aa8c74cf08116 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-074-19/+30
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/compositor/compositor_api/qwaylandquickitem.cpp Change-Id: Id2f49e8703a67daedcee66db83f006df828d9da0
| * Client tests: Support testing with window decorations enabledJohan Klokkhammer Helsing2018-01-052-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously tests would hang because eglInitialize (which was called on window decoration creation) would wait for a Wayland roundtrip while our compositor thread was waiting for more commands. Work around this by prematurely causing the clientBufferIntegration to be initialized before applicationInitialized (when the compositors switches to handling requests synchronously). Change-Id: I793c70a8f3a764cb3a70f00ddcab76cd4044b442 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| * Client tests: Fix wrong position being sent when mocking touch eventsJohan Klokkhammer Helsing2018-01-041-2/+6
| | | | | | | | | | | | | | We were sending ints when we should have been sending wl_fixed_ts. Change-Id: I9f074334cb3ea8a3d61789ff641c2d022a5989b7 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| * fix build without xkbcommon-evdevRaphael Freudiger2017-11-161-1/+1
| | | | | | | | | | | | Change-Id: I1a223b440a6678aebc04df49f62fedc382bd898b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'qt/5.9' into 5.10v5.10.0-beta3Paul Olav Tvete2017-10-2517-25/+379
|\| | | | | | | Change-Id: I6c283081669594b3e8c6b30194bb96e389319cb2
| * Fix crash when wl-shell setType is called with a hidden parentJohan Klokkhammer Helsing2017-10-201-0/+44
| | | | | | | | | | | | | | | | Fall back to creating a toplevel instead Change-Id: If7db27d08b79e4f9f8c82fa8f9bf73abdb2585d9 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Fix outdated BSD license headerKai Koehne2017-10-2010-23/+123
| | | | | | | | | | Change-Id: Ib1ee37ca626afad14b65303a3cfb134485ade736 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| * Fix crash after destroying view with mouse focusJohan Klokkhammer Helsing2017-10-186-2/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't emit QWaylandSeat::mouseFocusChanged with a destroyed QWaylandView. QWaylandPointer has been refactored to make it easier to follow enter and leave logic. A missing emit for buttonPressedChanged has been fixed as well. This also adds a test for pointer events to verify that setting mouse focus works and that the crash has been fixed. Task-number: QTBUG-63208 Change-Id: Id0c174a7b609dfd0152f3ae446dd51fd8befd554 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-201-0/+27
|\| | | | | | | Change-Id: I76bfc271efcf75c75bf38f4bf58503e1d2a00839
| * Fix crash when window attach is called without waiting for frame callbacksJohan Klokkhammer Helsing2017-08-311-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QWaylandWindow::attach was called before getting the frame callback, it would overwrite mFrameCallback. Hence, all but the last frame callback would still be alive after the QWaylandWindow destructor. When the dangling callbacks got invoked the data pointer was statically casted to the deleted QWaylandWindow, resulting in undefined behavior. In this change we only delete frame callbacks from the render thread, avoiding a race condition we fixed earlier. And we always destroy the frame callback when adding a new one, ensuring that the destructor will clean up the only remaining callback. There's a test confirming that the crash has been fixed. This fixes the flakiness of many of the qtbase auto tests. Change-Id: Iecb08ab48216eac61b1ebc5c0e0664d4aac900c0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Add support for xdg-shell-unstable-v6Johan Klokkhammer Helsing2017-07-211-0/+48
| | | | | | | | | | | | | | | | | | | | This adds QML and C++ support for xdg-shell-unstable v6 on the compositor side. A couple of things are still missing for complete support, but can be added implemented later without breaking the API. Task-number: QTBUG-56174 Change-Id: I08d7c05aa4f40f00377d92f2519d89ab416daaf4 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Add missing header guard to mocksurface.hJohan Klokkhammer Helsing2017-05-191-0/+5
|/ | | | | Change-Id: I353c8b67c0990ca6fc4d8168c09d2af8899ed081 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-2512-27/+172
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/wayland/custom-extension/client-common/main.cpp src/client/qwaylandwlshellintegration_p.h src/client/qwaylandxdgshellintegration_p.h src/compositor/compositor_api/qwaylandquickoutput.h src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h Change-Id: Ic78c610ddf102b0a185294f625bbfcb9238b0f3c
| * Replace all occurrences of Q_DECL_OVERRIDE with overrideJohan Klokkhammer Helsing2017-01-238-27/+27
| | | | | | | | | | Change-Id: I16b7b23efe944b49d1fcc9e7588cdb0a991cebd1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Add support for running compositors with custom device pixel ratioJohan Klokkhammer Helsing2016-12-164-0/+145
| | | | | | | | | | | | | | | | | | | | And add a manual test for showing that it works with different scale factors as well. Task-number: QTBUG-55303 Change-Id: Ib842ea51cfb62a2d46713e95d56b8a9da445d14d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | Fix pointless asserts in compositor testsJohan Klokkhammer Helsing2016-12-231-6/+6
| | | | | | | | | | | | Change-Id: Ie5528c988a15d130056f1d2a3b3e858d78897ba5 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Merge remote-tracking branch 'qt/5.8' into devPaul Olav Tvete2016-11-238-24/+184
|\| | | | | | | Change-Id: I8a9455105e8e3519f6a860f58820382d7e337b1e
| * 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-233-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Create and destroy the shell surface when showing and hidingGiulio Camuffo2016-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the shell surface handling for windows, and instead of creating the shell surface at initialization time, and then attaching a null buffer to hide it, it creates the shell surface on setVisible(true), and destroys it on setVisible(false). This fixes hiding when using xdg_shell, as that interface defines that attaching a null buffer to an xdg_surface is an error. Also this should help with bugged EGL drivers which attach a buffer after eglSwapBuffers() returns, which used to cause a newly hidden window to get a new valid buffer after we attached a null one, showing it again. Task-number: QTBUG-47902 Change-Id: I8e0a0442319a98cc1361803ea7be1d079b36fc8c Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Add a QML client manual testPier Luigi Fiorini2016-11-144-0/+173
| | | | | | | | | | | | | | | | This little program can be useful to test window states in clients and compositors. Change-Id: I8eadc0d83906805a909032fb9341037491f6d379 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-033-4/+20
|\| | | | | | | Change-Id: Ic2135c6ff27ca3fdef6a76dbdc72f73f5ca4d7fb
| * Clients tests: Don't send leave events for destroyed surfacesJohan Klokkhammer Helsing2016-10-113-4/+20
| | | | | | | | | | Change-Id: Ia7dd13f629439b116f494ff8b7432020a65ea1df Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Fix failing test for touch dragJohan Klokkhammer Helsing2016-10-101-0/+1
|/ | | | | | | | | Don't send both touch down and touch move in the same frame. This confuses mouse synthesis. Task-number: QTBUG-56433 Change-Id: I7f0b88d6a27c87464c26ce1c194dc7f07a0eb382 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-303-5/+93
| | | | | | | | | 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-2826-66/+533
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2326-61/+73
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/compositor/compositor.pro tests/auto/compositor/compositor/compositor.pro Change-Id: Id9f3cf97ca3b600bdafba846908643ff0f8964b9
| | * Fix autotest directory structurePaul Olav Tvete2016-08-1926-57/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-115-5/+460
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddisplay.cpp src/client/qwaylanddisplay_p.h src/client/qwaylandxdgpopup_p.h Change-Id: If86ea09971773dc6c541f07819459a90e8ab73a0
| | * Fix crash when dragging with touch without first having pointer focusJohan Klokkhammer Helsing2016-08-025-0/+282
| | | | | | | | | | | | | | | | | | | | | | | | Also add drag-and-drop tests for both touch and mouse. Task-number: QTBUG-54756 Change-Id: Ibfff48b1f2377022a8624e28e9f638076187ddca Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Client tests: Unlock mutex while processing compositor commandsJohan Klokkhammer Helsing2016-08-021-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | Only lock the client autotest compositor mutex when necessary. This allows compositor commands to be queued while a command is being processed. Change-Id: Ib2ca6b4942f57f56f56a055cbe6ce6d876695529 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Also test touch in client events testJohan Klokkhammer Helsing2016-08-015-1/+164
| | | | | | | | | | | | | | | | | | | | | Following the same pattern as for mouse and keyboard, also test touch events. Change-Id: Ie84aa0ffe0b0f4f66e9f40207c63d94e32f6dbaf Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | 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>
* | | Don't use deprecated wl_client_add_object and wl_display_add_globalJohan Klokkhammer Helsing2016-05-314-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | Use wl_global_create, wl_resource_create and wl_resource_set_implementation instead. Change-Id: I8b1812df3daa2f4fe2ef8e850aa93ab125dadcf8 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | | 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>
* | Move subsurface test application to tests/manualPaul Olav Tvete2016-05-027-0/+445
| | | | | | | | | | | | Change-Id: Ib69594d0c69238311d417f7b2954529c10da1ff6 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.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>