Commit Graph

15 Commits

Author SHA1 Message Date
Daniel Stone
8f4e39b6d7 Port to new Wayland and xkbcommon APIs
For Wayland, this is mostly the input protocol having changed, although
there's also the SHM pool API, the cursor API, as well as fullscreen and
ping.

Also port to the new (months-old) xkbcommon API, as used by Weston 0.95.
This involves having xkbcommon manage the state for us, where
appropriate.  Fans of multi-layout keyboards (or just caps lock) will no
doubt appreciate these changes.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-10-12 15:12:55 +01:00
Neil Roberts
dee544645b wayland: Fix some missing includes
The commit 90e5088 added some extra compiler warning options that were
triggering warnings when enabling the wayland build due to missing
header includes. This adds those header includes in.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-20 14:36:58 +00:00
Neil Roberts
5f654069fe clutter-input-device-wayland: Include clutter-stage-private.h
This was giving a warning about using _clutter_stage_update_state
without declaring it.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Neil Roberts
13e3f9e5f1 Add an input device function to convert keycodes to evdev codes
This adds a virtual function to ClutterInputDevice to translate a
keycode from the hardware_keycode member of ClutterKeyEvent to an
evdev keycode. The function can fail so that input backends that don't
have a sensible way to translate to evdev keycodes can return FALSE.
There are implementations for evdev, wayland and X. The X
implementation assumes that the X server is using an evdev driver in
which case the hardware keycodes are the evdev codes plus 8.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Rob Bradford
cf735b54df wayland: Add accessor API to permit access to underlying Wayland structures
* clutter_wayland_input_device_get_wl_input_device for the input device
* clutter_wayland_stage_get_wl_surface for the Wayland surface
* clutter_wayland_stage_get_wl_shell_surface for the shell surface
2012-02-14 13:54:15 +00:00
Emmanuele Bassi
2b547442a3 wayland: Use the Stage state tracking 2012-01-26 08:31:11 +00:00
Rob Bradford
a9e6137f47 wayland: Attach cursor buffer to input device when it enters the surface
The Wayland semantics mean that we must attach a buffer to the input device
when the pointer enters the surface to provide a cursor.
2012-01-10 17:30:57 +00:00
Rob Bradford
320356e97f wayland: Refine enter/leave event handling
The Wayland protocol now has events represent when a pointer enters the
surface and when it leaves again.

For leaves the surface is not set in the event, for enters the surface is set.
Simply use this to determine whether to emit CLUTTER_ENTER or CLUTTER_LEAVE.
2011-12-08 17:44:53 +00:00
Robert Bragg
07c6f96cb4 wayland: Updates client side wayland support
This updates Wayland support in line with upstream changes to the Wayland
API and protocol.

This update means we no longer use the Cogl stub winsys so a lot of code
that had to manually interact with EGL and implement a swap_buffers
mechanism could be removed and instead we now depend on Cogl to handle
those things for us.

This update also adds an input device manager consistent with other
clutter backends.

Note: to use the client side "wayland" clutter backend you need to have
built Cogl with --enable-wayland-egl-platform. If Cogl has been built
with support for multiple winsys backends then you should run
applications with COGL_RENDERER=EGL in the environment.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-12-08 16:13:37 +00:00
Emmanuele Bassi
3e5aa9ed63 Add private header for event-related API 2011-02-18 16:35:36 +00:00
Emmanuele Bassi
0f56abf569 */event: Never manipulate the event queue directly
Always use _clutter_event_push() instead.
2011-01-21 10:25:45 +00:00
nobled
d8a544c0f1 wayland: fix typo
Fixes the build error:

clutter-input-device-wayland.c:154:69:
error: too few arguments to function call

http://bugzilla.clutter-project.org/show_bug.cgi?id=2473
2010-12-09 13:32:41 +00:00
Damien Lespiau
ef5256ec25 evdev: Factor out the xkbcommon code from the wayland client backend
The wayland client code has support for translating raw linux input
device key codes coming from the wayland compositor into key symbols
thanks to libxkbcommon.

A backend directly listening to linux input devices (called evdev, just
like the Xorg one) could use exactly the same code for the translation,
so abstract it a bit in a separate file.
2010-11-30 14:40:37 +00:00
Emmanuele Bassi
c1771d152e Clean up clutter-private.h/1
Move DeviceManager/InputDevice private API to a different header.
2010-10-21 10:54:14 +01:00
Kristian Høgsberg
cb5582c4ab Add wayland backend
This adds a clutter backend for running under the wayland window system.
Initial cogl framebuffer integration by Robert Bragg.
2010-10-14 16:23:05 +01:00