shell: update position of surfaces with type none on map()
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Wed, 15 Feb 2012 15:02:56 +0000 (17:02 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 17 Feb 2012 04:19:39 +0000 (23:19 -0500)
commite9e0515cec7798d0fb2b47abb6b8ca8cbbf1e23c
tree309137ae92d32046c5304fe40909e8f2df13ae87
parentd595f65fe208a42392680f9d32c143b37ea2f840
shell: update position of surfaces with type none on map()

Needed for implementing drag'n'drop icons. When a drag starts, the
compositor will position the top-left corner of the client supplied
icon surface at the cursor hotspot. On the first attach to that
surface, the client may want to reposition it but shell->map did not
take sx and sy parameters.

This changes shell->map interface to take sx and sy parameters and
change dekstop shell implementation to update the position of a
surface of type none according to those parameters. Since a surface
of type none won't actually be mapped, the effect of this change is
only visible for surfaces that are made visible by the compositor.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
src/compositor.c
src/compositor.h
src/shell.c
src/tablet-shell.c