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>
The biggest performance bottleneck while resizing is the continous
setting up and tearing down of mmaps and faulting in pages. This commit
introduces a per-window pool that we'll allocate buffers out of if it's
available. Then we set initialize it to a big shm pool when we start
resizing and free it when resizing is done.
There was a lot of code here to do a lot of work we didn't need to do.
If we damage a surface with a shm buffer attached, all we need to do
is to re-upload the damaged region to the texture. As for drm buffers,
we don't assume anything changes on attach and only update the
regions the client tells us to update in the damage request.