summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Client: Add basic support for tablet-unstable-v2Johan Klokkhammer Helsing2020-01-083-0/+926
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] Added support for drawing tablets through the tablet-unstable-v2 protocol. Adds support for the basic one tablet, one tool, no pads scenario. Besides the auto tests, I tested with a Huion Kamvas Pro 16 with a simple pressure sensitive pen with two buttons. As far as I can tell, it works the same way as on xcb on Sway and Gnome Shell. Also tested on a Wacom PTZ-630 with a mouse, art pen, airbrush and a stylus. Mapped the distance event to QTabletEvent::Z and slider to QTabletEvent::tangentialPressure. For now we send QTabletEvents even when there's a mouse or finger on the tablet. Those should ideally be sent as QMouseEvents/QTouchEvents, but that's out of scope for this patch, but at least we will send synthesized mouse events if the tablet events are not accepted. Change-Id: I93291ffa5f00fa2bb8533eddd8d873b84a3386b8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Wait for window.isExposed() in flushUnconfiguredXdgSurface() testUlf Hermann2019-12-121-1/+1
| | | | | | | | | | We generally don't expect the window to react synchronously, as shown in other tests that already have the QTRY_VERIFY(window.isExposed()). Add the waiting behavior to flushUnconfiguredXdgSurface() in order to avoid flakiness. Change-Id: I5824be0a806ec4bd0df30b3187a6549fd81d16be Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-101-1/+46
|\ | | | | | | Change-Id: I1f9418f4f5783291286417f6faf6277e0679007c
| * Add client test for hiding the toplevel parent of a popupJohan Klokkhammer Helsing2019-12-061-0/+45
| | | | | | | | | | | | | | | | This used to cause undefined behavior. Task-number: QTBUG-80562 Change-Id: I0397b7b304f316616d2a713063bc5a634dc081bc Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Client tests: Fix missing frame eventJohan Klokkhammer Helsing2019-12-051-1/+1
| | | | | | | | | | Change-Id: I8bda37560ff8b3c97699831427b0a148f8a5970c Reviewed-by: David Edmundson <davidedmundson@kde.org>
* | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2019-12-041-0/+33
|\ \
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-031-0/+33
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/configure.json Change-Id: Id608424a63a4bcef4adb3f66d55a3cc32c86f2a2
| | * Add client test for touch down and motion in same frameJohan Klokkhammer Helsing2019-11-291-0/+33
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-79744 Change-Id: Ibb8239b4f53a345105bee3cc7a0fb4b777cabf9b Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Client: Add test for a compositor with no outputsJohan Klokkhammer Helsing2019-12-044-1/+75
|/ / | | | | | | | | | | | | | | | | | | This needs to be a separate test and can't be part of tst_output because there is special screen handling at platform integration initialization, which only happens once per test process. Task-number: QTBUG-79111 Change-Id: Iad9f98be6807c9071c783db1fa8e8c81a7de08be Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-232-8/+5
|\| | | | | | | Change-Id: If5fcfe5252c1ac1db63ec77136b186a104280b57
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-122-8/+5
| |\ | | | | | | | | | Change-Id: I24b2eade3e8946a654ef6cf3d02ea95255aa1c00
| | * Fix race condition in tests on xdg_toplevel configure5.13Johan Klokkhammer Helsing2019-11-072-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | Tests should not use non-direct connections, as that means tests can run when the compositor is not locked. Change-Id: I7b1f0e3bb866db540f72307ad96f778ec0edd7ee Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Client: Add test for removing and adding a screen at runtimeJohan Klokkhammer Helsing2019-11-121-0/+43
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-79111 Change-Id: I4b8f08148850fe02972266936ba7d8d6ed1f36bb Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-094-2/+67
|\| | | | | | | | | | | Change-Id: Idf4c63d08423691afd8823c734ba79085aa9e14f
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-11-054-2/+67
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddisplay.cpp src/client/qwaylandwindow.cpp Change-Id: I30ddf5305b3087b93cf4d6e562fd0146dea61cc0
| | * Add client test for subsurface with hidden parentJohan Klokkhammer Helsing2019-11-041-0/+23
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-79674 Change-Id: I451ee4423dee511f41070498a61167912920c086 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Add basic client test for subsurfacesJohan Klokkhammer Helsing2019-11-043-1/+43
| | | | | | | | | | | | | | | Change-Id: I1ef21287933a2afccad989f47e4fe59329b6f537 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Client tests: Fix flaky deadlockJohan Klokkhammer Helsing2019-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes the test would wait indefinitely in the compositor constructor, while also waiting in the compositor thread for m_ready to become true. m_ready is set to true in applicationInitialized(), which is supposed to be called from the client thread after QGuiApplication has been created (and also after the MockCompositor constructor has returned). I.e. the problem is that the wake in MockCompositor::run may sometimes happen before the MockCompositor::MockCompositor starts waiting. Move the wake inside the pre-initialized compositor loop. Essentially waking every 20 ms until the application is initialized. Fixes: QTBUG-66570 Change-Id: Ia5eba5d08ce4d1d3eeca99eae6cfa7d9d4fd5a0b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Simon Hausmann2019-10-314-3/+7
|\| | | | | | | | | | | Change-Id: I29524a74e495dd46c0dc5d0a0d10e41e55526f14
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Johan Klokkhammer Helsing2019-10-313-3/+6
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: If2159587c5183fcf57558f045bd9af2f25c8289f
| | * Set temporary XDG_RUNTIME_DIR for more testsJohan Klokkhammer Helsing2019-10-313-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests were left out when we switched to using a temporary XDG_RUNTIME_DIR. Fixes: QTBUG-79652 Change-Id: I8208d63f3f6a937406d25b1a8cf3f5b0be04bc73 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-261-0/+1
| |\| | | | | | | | | | Change-Id: Ie283d8861ecf11f21621ab18efdc780143559b52
| | * Client tests: Set WAYLAND_DISPLAYJohan Klokkhammer Helsing2019-10-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests would previously fail if WAYLAND_DISPLAY was set to something other than empty or wayland-0. For instance when running multiple compositors and trying to run the tests, they would fail because they create a compositor on wayland-0 (using wl_display_add_socket_auto()), but would try to connect to wayland-1 due to the env var. Change-Id: I7771d41737410d5c32f5a6db3de4987096cb4d22 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-267-5/+73
|\| | | | | | | | | | | Change-Id: If09bb13aa7a0aadd5cfb8265166d3b9d1b22e2f1
| * | Fix QClipboard::ownSelection always returning falseJohan Klokkhammer Helsing2019-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | It would return false regardless of whether we owned the selection. Change-Id: I6df394d8dbceeccb6eb6d0670b4351af1a158491 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | Fix missing emission of QClipboard::selectionChangedJohan Klokkhammer Helsing2019-10-241-0/+30
| | | | | | | | | | | | | | | | | | | | | And add a test to verify we've fixed it. Change-Id: Ic6d5e64b3000444465935f7caf7e32ec9c4f1012 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | Add client test for clipboard when losing keyboard focusJohan Klokkhammer Helsing2019-10-232-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | Also, verifies that we fixed a recent bug about QClipboard::dataChanged not being emitted when the clipboard is invalidated due to losing focus. Change-Id: Ie92b618a4f673c21d6582979249700aef8785536 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Johan Klokkhammer Helsing2019-10-214-4/+12
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandwindow.cpp tests/auto/compositor/compositor/tst_compositor.cpp Change-Id: Iacfcae577a4a99c847694ae3a2c6e3e9ae050817
| | * Fix build: Use temporary directories for tests' XDG_RUNTIME_DIRJohan Klokkhammer Helsing2019-10-144-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using XDG_RUNTIME_DIR="." does not work after qtbase 5542785, and it was a rather brittle solution anyway. Fixes: QTBUG-79185 Change-Id: Iaf9ced66709cc6cbac8a2d54efc64e1a8c528561 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-121-0/+11
|\| | | | | | | | | | | Change-Id: Ia858f86e6a281f03bea17d0cc6bca300833ccda3
| * | Merge remote-tracking branch 'origin/5.13' into 5.14v5.14.0-beta1Qt Forward Merge Bot2019-10-011-0/+11
| |\| | | | | | | | | | Change-Id: Ie236fa47c23456b15414c3b3e89568b915979ebe
| | * Client: Don't crash with long window titles using UTF-16 charactersJohan Klokkhammer Helsing2019-09-251-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we set the max length in QString character length, which means UTF-16 characters (of potentially three bytes) counts as one character. The max limit of libwayland, however, is in bytes (and the string itself is converted to UTF-8). Fix it by dividing the character limit by three because in the worst case each UTF-16 character will use three bytes when UTF-8 encoded. Fixes: QTBUG-78478 Change-Id: Idf4721894e0fe6f3cd92bdc6ada7b0ea4199ea63 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Remove unused member variableKari Oikarinen2019-10-011-2/+0
|/ / | | | | | | | | Change-Id: I767ece2b090f95947fce34e743eec37299e62749 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-242-1/+2
|\| | | | | | | | | | | | | Conflicts: sync.profile Change-Id: I6f6d44ec285d37e64e430303ef9a87ac7aaf3eb9
| * Mock client: Add missing include for QMapJohan Klokkhammer Helsing2019-09-211-0/+1
| | | | | | | | | | | | | | Task-number: QTBUG-78177 Change-Id: I123e129f09ce8599e68be710147b07235ae9462a Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| * Fix wrong target name for tst_client_fullscreenshellv1Johan Klokkhammer Helsing2019-09-201-1/+1
| | | | | | | | | | | | Task-number: QTBUG-78177 Change-Id: Id44794523511241b408e79383e438e52f769d62a Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Client: Test that wl_touch.up events don't split touch framesv5.14.0-alpha1Johan Klokkhammer Helsing2019-09-201-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a workaround for Weston not sending wl_touch.frame events after the last wl_touch.up event. It calls Touch::touch_frame to generate a fake event. The problem, however, is that it used to erroneously do this on wl_touch.up events even when it was not for the last touch point. This in turn, lead to extra frame events being inserted in the middle of a touch sequence, effectively splitting up one touch frame into multiple. Accumulated touch state would be handled prematurely, preventing wl_touch.cancel from working correctly for instance. This tests that we've stopped doing that. Change-Id: Ic545bbb18c23b827e5fa07a642a374094d720dae Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Add client test for multi touch motionJohan Klokkhammer Helsing2019-09-173-0/+86
| | | | | | | | | | | | | | | | | | Make sure touchPoint order doesn't change even though the compositor event order does. Task-number: QTBUG-77014 Change-Id: If6b8a930344836ca52cc12fe7f29c8ac863d81ba Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Blacklist tst_seatv4::animatedCursor() in b2qtLiang Qi2019-09-171-0/+2
| | | | | | | | | | | | Task-number: QTBUG-78317 Change-Id: I66e35782470cedd4d3cfeed6ffdfd8d54bc0ba26 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Compositor: Expose QPointF version of inputRegionContainsJohan Klokkhammer Helsing2019-09-161-0/+5
| | | | | | | | | | | | | | | | | | QWaylandSurface::inputRegionContains(const &QPointF) was added in a patch release. Expose it here and start testing it. Task-number: QTBUG-77457 Change-Id: I9e5e487e1d93a2b1873a7e219eed9ef6b0a418b5 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Add client test for floating point touchJohan Klokkhammer Helsing2019-09-161-0/+32
| | | | | | | | | | | | Task-number: QTBUG-77457 Change-Id: I49df80f3e00d349fed273363cd2625b841c085c5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Johan Klokkhammer Helsing2019-09-165-2/+238
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddatadevice.cpp src/client/qwaylandinputcontext.cpp src/client/qwaylandinputdevice.cpp src/client/qwaylandwindow.cpp src/compositor/compositor_api/compositor_api.pri src/compositor/compositor_api/qwaylandquickitem.cpp Change-Id: Ice0d8c7d869c9c46113d6ee6ba3adf895a71d58f
| * Add client test for floating point mouse pressJohan Klokkhammer Helsing2019-09-101-0/+25
| | | | | | | | | | Change-Id: Ia7cfb1bc86945e08a2ff2c794afb405110e819f9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Client: Add test for starting a drag operation without input focusJohan Klokkhammer Helsing2019-09-091-2/+19
| | | | | | | | | | | | | | | | This used to crash the client. Task-number: QTBUG-76368 Change-Id: I855f3bda15b4b2bccbdb2aa8239e26c0eecf7cb3 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Add client test for xdg-decoration-unstable-v1Johan Klokkhammer Helsing2019-09-033-0/+194
| | | | | | | | | | | | | | | | And verify that we don't create decorations prematurely. Change-Id: I621631f0c355529e5afb6a615f909f18c2a4b509 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Johan Klokkhammer Helsing2019-09-031-0/+1
|\| | | | | | | | | | | | | | | Conflicts: src/client/qwaylandinputdevice.cpp src/client/qwaylandwindow.cpp Change-Id: Ifd64debc484197829d2fe412afa98c29b382efa5
| * Client tests: Set XDG_CURRENT_DESKTOP to avoid platform themesJohan Klokkhammer Helsing2019-08-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the client tests are run from within a desktop environment, the XDG_CURRENT_DESKTOP variable may be set, causing the client to try to load a platform theme for the user's desktop. The tests, however, are running against a mock Wayland compositor, so launching a platform theme that expects to connect to a certain compositor implementation is probably not a good idea. And furthermore, if the gtk3 platform theme is used, it will start binding to interfaces and create wayland objects, confusing our existing test code. Setting XDG_CURRENT_DESKTOP to qtwaylandtests will prevent detection of the (outer) desktop environment, making tests more predictable. Change-Id: I57fa76e51cecdd0cbe8be6bd075ce67e9d2892bc Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Remove usages of deprecated APIs of QWheelEventSona Kurazyan2019-08-282-45/+17
| | | | | | | | | | | | | | | | | | | | | | - Replaced the usages of deprecated QWheelEvent::delta() and QWheelEvent::orientation() with QWheelEvent::angleDelta(). - Removed the tests for deprecated APIs. Task-number: QTBUG-76491 Change-Id: I2f9a53d3236bce8ba6cee66ec1b0b933d50518aa Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Client tests: Add test for a simple wl_touch tapJohan Klokkhammer Helsing2019-08-273-0/+98
| | | | | | | | | | Change-Id: I35aec950da0ac0d10cf1fa0c4bc1f56ba232cf89 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Client tests: Add touch infrastructure and simple testJohan Klokkhammer Helsing2019-08-275-7/+54
| | | | | | | | | | | | | | | | | | | | This doesn't test much, but adds the infrastructure needed for more thorough tests later on. More or less exactly matches the mocking for wl_keyboard and wl_pointer. Change-Id: I563bb9be7ccaaf0aa83611e84d051cc307455ccb Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>