diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-03 17:03:29 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-04-04 18:47:48 -0400 |
commit | b7e779491232b825f6edc0b199e7564e93f1e332 (patch) | |
tree | 00457213fa57ec07692bb093392a83203e0e9960 /protocols | |
parent | 06fbd51ff5563f548599615a6baf5a1854bf9983 (diff) |
Implement input-inhibit in sway, swaylock
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/meson.build | 6 | ||||
-rw-r--r-- | protocols/wlr-input-inhibitor-unstable-v1.xml | 67 |
2 files changed, 71 insertions, 2 deletions
diff --git a/protocols/meson.build b/protocols/meson.build index 0887cf86..7f83b16b 100644 --- a/protocols/meson.build +++ b/protocols/meson.build @@ -22,12 +22,14 @@ wayland_scanner_server = generator( client_protocols = [ [wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'], - ['wlr-layer-shell-unstable-v1.xml'] + ['wlr-layer-shell-unstable-v1.xml'], + ['wlr-input-inhibitor-unstable-v1.xml'] ] server_protocols = [ [wl_protocol_dir, 'unstable/xdg-shell/xdg-shell-unstable-v6.xml'], - ['wlr-layer-shell-unstable-v1.xml'] + ['wlr-layer-shell-unstable-v1.xml'], + ['wlr-input-inhibitor-unstable-v1.xml'] ] client_protos_src = [] diff --git a/protocols/wlr-input-inhibitor-unstable-v1.xml b/protocols/wlr-input-inhibitor-unstable-v1.xml new file mode 100644 index 00000000..b62d1bb4 --- /dev/null +++ b/protocols/wlr-input-inhibitor-unstable-v1.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<protocol name="wlr_input_inhibit_unstable_v1"> + <copyright> + Copyright © 2018 Drew DeVault + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that copyright notice and this permission + notice appear in supporting documentation, and that the name of + the copyright holders not be used in advertising or publicity + pertaining to distribution of the software without specific, + written prior permission. The copyright holders make no + representations about the suitability of this software for any + purpose. It is provided "as is" without express or implied + warranty. + + THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + THIS SOFTWARE. + </copyright> + + <interface name="zwlr_input_inhibit_manager_v1" version="1"> + <description summary="inhibits input events to other clients"> + Clients can use this interface to prevent input events from being sent to + any surfaces but its own, which is useful for example in lock screen + software. It is assumed that access to this interface will be locked down + to whitelisted clients by the compositor. + </description> + + <request name="get_inhibitor"> + <description summary="inhibit input to other clients"> + Activates the input inhibitor. As long as the inhibitor is active, the + compositor will not send input events to other clients. + </description> + <arg name="id" type="new_id" interface="zwlr_input_inhibitor_v1"/> + </request> + + <enum name="error"> + <entry name="already_inhibited" value="0" summary="an input inhibitor is already in use on the compositor"/> + </enum> + </interface> + + <interface name="zwlr_input_inhibitor_v1" version="1"> + <description summary="inhibits input to other clients"> + While this resource exists, input to clients other than the owner of the + inhibitor resource will not receive input events. The client that owns + this resource will receive all input events normally. The compositor will + also disable all of its own input processing (such as keyboard shortcuts) + while the inhibitor is active. + + The compositor may continue to send input events to selected clients, + such as an on-screen keyboard (via the input-method protocol). + </description> + + <request name="destroy" type="destructor"> + <description summary="destroy the input inhibitor object"> + Destroy the inhibitor and allow other clients to receive input. + </description> + </request> + </interface> +</protocol> |