[PATCH wayland] protocol: Bump seat to version 7 and require keymaps be private
ppaalanen at gmail.com
Fri Nov 2 11:14:11 UTC 2018
On Thu, 1 Nov 2018 13:01:13 -0500
Derek Foreman <derek.foreman.samsung at gmail.com> wrote:
> On 11/1/18 12:18 PM, Philipp Kerling wrote:
> > Actually... (below)
> Yes, you are of course strictly correct.
> However, the recent previous commits that bumped wl_seat version 9a18a8
> and c5356e have also kept all three children in sync, and it's become
> de-facto convention to do so.
Yeah, either we bump them like this, or when someone then adds
something to e.g. wl_touch, he needs to know to take the new version
from wl_seat + 1, not wl_touch + 1.
Either way, the end result works exactly the same, and wl_touch etc.
will have some versions where nothing changed.
> > 2018-11-01 (木) の 11:15 -0500 に Derek Foreman さんは書きました:
> >> Weston commit 76829fc4eaea329d2a525c3978271e13bd76c078 (and similar
> >> commits for other compositors) protects the compositor's keyboard
> >> mapping from client damage by duplicating the keymap for every
> >> client.
> >> On some systems there are other potential fixes for this - such as
> >> using sealed memfds on linux - but we can't use them since
> >> essentially all client code anywhere has mapped the keyboard map
> >> with a MAP_SHARED mmap() call.
> >> While we can't break years worth of code, we can require any future
> >> clients to use MAP_PRIVATE if they use a seat version above 6.
> >> If a compositor can't use sealing or a similar facility, it should
> >> still protect itself with copied keymaps, but clients must always
> >> assume shared mapping of a keymap will fail.
> >> Signed-off-by: Derek Foreman <derek.foreman.samsung at gmail.com>
> >> ---
> >> protocol/wayland.xml | 11 +++++++----
> >> 1 file changed, 7 insertions(+), 4 deletions(-)
> >> diff --git a/protocol/wayland.xml b/protocol/wayland.xml
> >> index 141038b..802d433 100644
> >> --- a/protocol/wayland.xml
> >> +++ b/protocol/wayland.xml
> >> @@ -1660,7 +1660,7 @@
> >> </request>
> >> </interface>
> >> - <interface name="wl_seat" version="6">
> >> + <interface name="wl_seat" version="7">
> >> <description summary="group of input devices">
> >> A seat is a group of keyboards, pointer and touch devices.
> >> This
> >> object is published as a global during start up, or when such
> >> a
> >> @@ -1769,7 +1769,7 @@
> >> </interface>
> >> - <interface name="wl_pointer" version="6">
> >> + <interface name="wl_pointer" version="7">
> > What is the reason for this version bump? The wl_pointer behavior is
> > unaffected by the wl_keyboard change, right? As far as I understood the
> > protocol versioning rules, bumping all child interfaces when updating
> > one child interface is not required. In fact that would make their
> > version counters quite superfluous.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the wayland-devel