[PATCH RFC wayland-protocols] unstable: add xcursor-configuration
johan.helsing at qt.io
Tue Oct 16 12:10:54 UTC 2018
Thanks for working on this! :)
Is the intention to implement the client side inside libwayland-cursor? No
changes needed for toolkits except calling some new API when initializing
I guess it's also possible to implement it on the toolkit level using the old
libwayland-cursor API... Which would allow us to use the extension before
everyone has upgraded to the new libwayland-cursor.
> + <request name="get_xcursor_configuration_seat">
To me, this sounds a bit like we're getting some kind of seat from the
request. How about get_seat_xcursor_configuration? Or simply
> + <event name="default_cursor">
> + <description summary="default cursor name">
> + The default_cursor event describes the default XCursor cursor name to be
> + used for this seat.
> + </description>
Maybe explain the use case here?
And another thing, maybe we can explicitly say this is a hint for the client?
I'm asking because I don't think we have a matching concept of a default
cursor in Qt... We just have Qt::QCursorShape::ArrowCursor. We could
make this request override what that shape is, but that might be confusing
to application developers if some compositor decides to set the default
cursor to a cross or some other non-arrow cursor. Anyway, this event is
going to cause some minor issues in Qt, perhaps in other toolkits as well.
Otherwise, this looks great :) Looking forward to having uniform cursor
From: wayland-devel <wayland-devel-bounces at lists.freedesktop.org> on behalf of Simon Ser <contact at emersion.fr>
Sent: Friday, October 12, 2018 7:40:21 PM
To: wayland-devel at lists.freedesktop.org
Cc: Simon Ser
Subject: [PATCH RFC wayland-protocols] unstable: add xcursor-configuration
Clients are responsible for loading and setting cursors. For this
purpose they often use XCursor images via the libwayland-cursor
library. However clients have no way to know the user's preferred
theme and size. This results in inconsistent cursors across
clients (e.g. cursor growing bigger when entering a surface).
This protocol fixes this issue by sending the user's XCursor
preferences to the client. It also allows for per-seat cursor
Signed-off-by: Simon Ser <contact at emersion.fr>
This is a draft of the XCursor configuration protocol. It's pretty
It still doesn't allow to configure differently wl_pointer's cursor
and the tablet tool's cursor. Maybe this can be done with an enum
and a new get_xcursor_configuration_seat argument?
unstable/xcursor-configuration/README | 4 +
.../xcursor-configuration-unstable-v1.xml | 105 ++++++++++++++++++
2 files changed, 109 insertions(+)
create mode 100644 unstable/xcursor-configuration/README
create mode 100644 unstable/xcursor-configuration/xcursor-configuration-unstable-v1.xml
diff --git a/unstable/xcursor-configuration/README b/unstable/xcursor-configuration/README
new file mode 100644
@@ -0,0 +1,4 @@
+xcursor configuration protocol
+Simon Ser <contact at emersion.fr>
diff --git a/unstable/xcursor-configuration/xcursor-configuration-unstable-v1.xml b/unstable/xcursor-configuration/xcursor-configuration-unstable-v1.xml
new file mode 100644
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ Copyright © 2018 Simon Ser
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ The above copyright notice and this permission notice (including the next
+ paragraph) shall be included in all copies or substantial portions of the
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+ <description summary="protocol to configure XCursor themes">
+ This protocol allows compositors to advertize XCursor configuration to
+ Once compositor configuration is received, clients are responsible for
+ loading the XCursor theme, creating wl_buffers with cursor images and
+ setting the cursor.
+ Warning! The protocol described in this file is experimental and
+ backward incompatible changes may be made. Backward compatible changes
+ may be added together with the corresponding interface version bump.
+ Backward incompatible changes are done by bumping the version number in
+ the protocol and interface names and resetting the interface version.
+ Once the protocol is to be declared stable, the 'z' prefix and the
+ version number in the protocol and interface names are removed and the
+ interface version number is reset.
+ <interface name="zwp_xcursor_configuration_manager_v1" version="1">
+ <description summary="XCursor configuration manager">
+ A global factory interface for wp_xcursor_configuration objects.
+ <request name="destroy" type="destructor">
+ <description summary="destroy the XCursor configuration manager object">
+ Destroy the XCursor configuration manager. This doesn't destroy objects
+ created with the manager.
+ <request name="get_xcursor_configuration_seat">
+ <description summary="create a wp_xcursor_configuration object for a seat">
+ This creates a new wp_xcursor_configuration object for the given
+ <arg name="id" type="new_id" interface="zwp_xcursor_configuration_v1"/>
+ <arg name="seat" type="object" interface="wl_seat"/>
+ <interface name="zwp_xcursor_configuration_v1" version="1">
+ <description summary="XCursor configuration for a seat">
+ A Xcursor configuration seat object describes XCursor settings for a
+ specific seat.
+ <request name="destroy" type="destructor">
+ <description summary="destroy this object">
+ Using this request a client can tell the server that it is not going to
+ use this object anymore.
+ <event name="done">
+ <description summary="all information about the configuration has been sent">
+ This event is sent after all other properties of a
+ wp_xcursor_configuration have been sent.
+ This allows changes to the wp_xcursor_configuration properties to be
+ seen as atomic, even if they happen via multiple events.
+ <event name="theme">
+ <description summary="theme configuration">
+ The theme event describes XCursor theme configuration for this seat.
+ <arg name="name" type="string" summary="theme name"/>
+ <arg name="size" type="uint" summary="theme size"/>
+ <event name="default_cursor">
+ <description summary="default cursor name">
+ The default_cursor event describes the default XCursor cursor name to be
+ used for this seat.
+ <arg name="name" type="string" summary="default cursor name"/>
wayland-devel mailing list
wayland-devel at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wayland-devel