• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="xwayland_keyboard_grab_unstable_v1">
3
4  <copyright>
5    Copyright © 2017 Red Hat Inc.
6
7    Permission is hereby granted, free of charge, to any person obtaining a
8    copy of this software and associated documentation files (the "Software"),
9    to deal in the Software without restriction, including without limitation
10    the rights to use, copy, modify, merge, publish, distribute, sublicense,
11    and/or sell copies of the Software, and to permit persons to whom the
12    Software is furnished to do so, subject to the following conditions:
13
14    The above copyright notice and this permission notice (including the next
15    paragraph) shall be included in all copies or substantial portions of the
16    Software.
17
18    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24    DEALINGS IN THE SOFTWARE.
25  </copyright>
26
27  <description summary="Protocol for grabbing the keyboard from Xwayland">
28    This protocol is application-specific to meet the needs of the X11
29    protocol through Xwayland. It provides a way for Xwayland to request
30    all keyboard events to be forwarded to a surface even when the
31    surface does not have keyboard focus.
32
33    In the X11 protocol, a client may request an "active grab" on the
34    keyboard. On success, all key events are reported only to the
35    grabbing X11 client. For details, see XGrabKeyboard(3).
36
37    The core Wayland protocol does not have a notion of an active
38    keyboard grab. When running in Xwayland, X11 applications may
39    acquire an active grab inside Xwayland but that cannot be translated
40    to the Wayland compositor who may set the input focus to some other
41    surface. In doing so, it breaks the X11 client assumption that all
42    key events are reported to the grabbing client.
43
44    This protocol specifies a way for Xwayland to request all keyboard
45    be directed to the given surface. The protocol does not guarantee
46    that the compositor will honor this request and it does not
47    prescribe user interfaces on how to handle the respond. For example,
48    a compositor may inform the user that all key events are now
49    forwarded to the given client surface, or it may ask the user for
50    permission to do so.
51
52    Compositors are required to restrict access to this application
53    specific protocol to Xwayland alone.
54
55    Warning! The protocol described in this file is experimental and
56    backward incompatible changes may be made. Backward compatible
57    changes may be added together with the corresponding interface
58    version bump.
59    Backward incompatible changes are done by bumping the version
60    number in the protocol and interface names and resetting the
61    interface version. Once the protocol is to be declared stable,
62    the 'z' prefix and the version number in the protocol and
63    interface names are removed and the interface version number is
64    reset.
65  </description>
66
67  <interface name="zwp_xwayland_keyboard_grab_manager_v1" version="1">
68    <description summary="context object for keyboard grab manager">
69      A global interface used for grabbing the keyboard.
70    </description>
71
72    <request name="destroy" type="destructor">
73      <description summary="destroy the keyboard grab manager">
74	Destroy the keyboard grab manager.
75      </description>
76    </request>
77
78    <request name="grab_keyboard">
79      <description summary="grab the keyboard to a surface">
80	The grab_keyboard request asks for a grab of the keyboard, forcing
81	the keyboard focus for the given seat upon the given surface.
82
83	The protocol provides no guarantee that the grab is ever satisfied,
84	and does not require the compositor to send an error if the grab
85	cannot ever be satisfied. It is thus possible to request a keyboard
86	grab that will never be effective.
87
88	The protocol:
89
90	* does not guarantee that the grab itself is applied for a surface,
91	  the grab request may be silently ignored by the compositor,
92	* does not guarantee that any events are sent to this client even
93	  if the grab is applied to a surface,
94	* does not guarantee that events sent to this client are exhaustive,
95	  a compositor may filter some events for its own consumption,
96	* does not guarantee that events sent to this client are continuous,
97	  a compositor may change and reroute keyboard events while the grab
98	  is nominally active.
99      </description>
100
101      <arg name="id" type="new_id" interface="zwp_xwayland_keyboard_grab_v1"/>
102      <arg name="surface" type="object" interface="wl_surface"
103	   summary="surface to report keyboard events to"/>
104      <arg name="seat" type="object" interface="wl_seat"
105	   summary="the seat for which the keyboard should be grabbed"/>
106    </request>
107  </interface>
108
109  <interface name="zwp_xwayland_keyboard_grab_v1" version="1">
110    <description summary="interface for grabbing the keyboard">
111      A global interface used for grabbing the keyboard.
112    </description>
113
114    <request name="destroy" type="destructor">
115      <description summary="destroy the grabbed keyboard object">
116	Destroy the grabbed keyboard object. If applicable, the compositor
117	will ungrab the keyboard.
118      </description>
119    </request>
120  </interface>
121</protocol>
122