[RFC] Cursor sprites as regular surfaces

Ander Conselvan de Oliveira conselvan2 at gmail.com
Thu Feb 23 03:42:46 PST 2012


Here's an RFC for implementing the cursor sprites as regular surfaces
change we have been talking about. This removes the input_device.attach
request and adds two new ones: set_pointer_surface and set_hotspot.

Each client can set a pointer surface that is displayed when it has
pointer focus. The position of this surface will be the cursor location
offset by the hotspot set by set_hotspot. For now surface transformation
is ignored.

surface_attach has the same behavior as with regular surfaces, i.e., sx
and sy are relative to the surfaces top-left corner. The hotspot is
updated though, so that the cursor position does not move.

One of the changes to clients/window.c is done to test surface_attachs
to a pointer surface with sx,sy != 0 and is not really necessary.

This set does not implement these changes on wayland backend. It does
include the two fixes I just sent to the list.

Protocol changes:
-----------------

Ander Conselvan de Oliveira (1):
  protocol: make pointer images regular surfaces

 protocol/wayland.xml |   27 ++++++++++++++++++---------
 1 files changed, 18 insertions(+), 9 deletions(-)

Weston Changes:
---------------

Ander Conselvan de Oliveira (3):
  shell: don't assign output for surface of type none
  compositor: assign output to drag surfaces
  compositor: implement new pointer surface protocol

 clients/window.c |   25 +++++++-
 src/compositor.c |  181 ++++++++++++++++++++++++++++++++++++++++++++----------
 src/compositor.h |   10 +++
 src/shell.c      |    1 +
 4 files changed, 181 insertions(+), 36 deletions(-)

-- 
1.7.5.4



More information about the wayland-devel mailing list