Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_keyboard_key_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
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>
This event lets the compositor inform clients of the canonical keyboard
modifier/group state. Make sure we send it at appropriate moments from
the compositor, and listen for it in clients as well.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Here we create a new client/compositor interface in weston to allow
clients to report their x/y cursor position to the compositor. These
values are then used to center the zoom area on this point. This
is useful for everyone, especially people who are visually impaired.
Add option --self-only to dnd client. If this options is passed, the
drag will be started with no data source so that no drag and drop
events are sent to other clients.
If cairo-gl is used, display_create_surface() will create an
wl_egl_window for each surface and this will result in errors if this
surface is used as a source. Also, one can't get a wl_buffer for such
a surface wich led to crashes when trying to do so for the drag icon.
This patch works around both problems by forcing the item and drag icon
surfaces to use shm.
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>
Using the surface enter/leave events track which outputs the window is on and
store those in a "window_output_list" on the window.
To create this list we define a struct window_output that is the list
relationship between the window and the output.
If a client changes it's width/height values in it's widget resize handler,
the input region will be wrong because of the assumptions toytoolkit makes
in frame_resize_handler(). So far, gears is the only client that does this.
A little different from Daniels initial patch. We look up the common
modifiers at xkb init time and convert the xkb serialized modifier mask
to our own modifier bitmask.
To add greater precision when working with transformed surfaces and/or
high-resolution input devices.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Cursor images are fairly small and having one pool for each image adds
a lot of unnecessary overhead. Instead, create one large pool and
allocated all cursor images from that.
In order to do that, however, the code that creates shm surface needed
some refactoring. This patch adds a new struct shm_pool that is used
by the cursor and also changes struct window to use it.
These new protocol events allow us to tell which outputs a surface is on, and
potentially update where we allocate our buffers from.
Signed-off-by: Casey Dahlin <cdahlin@redhat.com>