The way to use system cursor and custom(client) cursor
Elvis Lee(이광웅)
kwangwoong.lee at lge.com
Sun Jun 9 16:01:48 PDT 2013
Hello.
I feel unnatural to implement custom cursor scenario. Here is a question.
How does a client request compositor to use system cursor?
The system cursor means a current default cursor for compositor.
Currently, client should know about the system cursor in order to use it as
parameter of wl_pointer.set_cursor.
Otherwise, cursor surface should be destroyed to request compositor a
rollback to system cursor from custom cursor.
I think it’s enough to detach buffer from cursor surface for hiding the
cursor.
And set_cursor(null surface) can be used to request to stop using custom
cursor. (rollback)
Here are some states and protocols.
1. System cursor -> Custom cursor
A. set_cursor(cursor_surface)
B. cursor_surface.attach(buffer for custom image)
C. cursor_surface.damage
D. cursor_surface.commit
2. Custom cursor -> System cursor
A. set_cursor(null surface)
3. Custom cursor -> Hide Cursor
A. set_cursor(cursor_surface) (can be omitted if it is already set)
B. cursor_surface.attach(null buffer)
C. cursor_surface.commit
4. System cursor -> Hide Cursor
A. set_cursor(cursor_surface)
B. cursor_surface.attach(null buffer) (can be omitted if it is already
detached)
C. cursor_surface.commit
I think this can cover up a scenario when pointer enters into a surface of
client.
If there is no specific cursor for client to want when pointer enters,
it’s enough to request set_cursor(null).
Is this approach possible? I want to listen your opinions.
Thanks.
Elvis.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130609/ecb6f765/attachment.html>
More information about the wayland-devel
mailing list