summaryrefslogtreecommitdiff
path: root/tests/test-client.c
AgeCommit message (Collapse)AuthorFilesLines
2012-10-21test-client: Make sure we process pending eevents before we verify stateKristian Høgsberg1-1/+1
Since the send-button-state request comes in on one socket and the wayland event we're looking for comes in on another socket, the order that we process the two in is undefined. Thus, button-test fails intermittently, depending on which event we process first. We change wl_display_flush() to wl_display_roundtrip(), to make sure that we deal with all wayland events before handling test protocol requests.
2012-10-11tests: Update tests to new APIsnextKristian Høgsberg1-12/+18
2012-10-04tests: Remove GLfloat usage.John Kåre Alsaker1-2/+1
2012-10-04tests: add keyboard testU. Artie Eoff1-1/+31
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-10-04tests: add button testU. Artie Eoff1-0/+15
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-10-04event-test: more aggressive event testingU. Artie Eoff1-9/+62
Test surface pointer enter/leave/motion and surface leave/enter events more aggressively. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-09-25test-client: initialize input instance.U. Artie Eoff1-1/+1
In seat_handle_capabilities, if input->pointer is not properly initialized, then it will contain an arbitrary value and results in the wl_pointer listener not getting registered if that value is not 0/null. Thus, use calloc to initialize the "input" instance. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=49937 Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-08-14event-test: fix compilationPhilipp Brüschweiler1-3/+4
Also fixes a compiler warning in test-client. The test is still failing, but that's for another patch. https://bugs.freedesktop.org/show_bug.cgi?id=53462
2012-07-09tests: Handle modifier event in test-client.cKristian Høgsberg1-0/+9
We need the handle the newly added modifiers event. https://bugs.freedesktop.org/show_bug.cgi?id=51567
2012-06-01Add support for wl_keyboard::keymap eventsDaniel Stone1-0/+8
These keymap events communicate the keymap from the compositor to the clients via fd passing, rather than having the clients separately compile a map. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Convert wl_pointer::axis to wl_fixed_tDaniel Stone1-1/+1
To go with the matching protocol change. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Use enum wl_pointer_button_state instead of integerDaniel Stone1-2/+3
Instead of using a uint32_t for state everywhere (except on the wire, where that's still the call signature), use the new wl_pointer_button_state enum, and explicit comparisons. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31test-client.c: Replace hard-coded magic valueDaniel Stone1-1/+2
Took me a second to work out that the 272 was actually BTN_LEFT, as keys and buttons share a namespace in evdev. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-17tests: Rename left-over caps_mask to capabilityKristian Høgsberg1-5/+5
2012-05-16Convert wl_input_device to wl_seat (and friends)Daniel Stone1-87/+74
wl_input_device has been both renamed and split. wl_seat is now a virtual object representing a group of logically related input devices with related focus. It now only generates one event: to let clients know that it has new capabilities. It takes requests which hand back objects for the wl_pointer, wl_keyboard and wl_touch interfaces it exposes which all provide the old input interface, just under different names. This commit tracks these changes in weston and the clients, as well as similar renames (e.g. weston_input_device -> weston_seat). Some other changes were necessary, e.g. renaming the name for the visible mouse sprite from 'pointer' to 'cursor' so as to not conflict. For simplicity, every seat is always exposed with all three interfaces, although this will change as time goes on. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-08Convert wire input co-ordinates to fixed-pointDaniel Stone1-8/+9
To add greater precision when working with transformed surfaces and/or high-resolution input devices. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-08Convert internal input co-ordinates to GLfloatDaniel Stone1-1/+2
Change all client motion handlers to take GLfloat for co-ordinates, rather than int32_t. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-07test-client: Include poll.h to silence warningDaniel Stone1-0/+1
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-04-27tests: Add event-test, which tests for a few incoming eventsKristian Høgsberg1-7/+291
We check that we get surface.enter_output and move the pointer into the window and make sure we get input_device.pointer_enter with the right coordinates. There's a lot of code for a very simple test here, so we need to figure out how to reuse most of the event handling and such. It's also not clear that a custom, text based protocol is practical here, we might just use a wayland extension after all.
2012-04-27tests: Generalize test client and add helpers for launching itKristian Høgsberg1-1/+28
2012-04-26tests: Add test case for basic client lifecycleKristian Høgsberg1-0/+45