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