x11: Implement inhibit_system_shortcuts API
authorOlivier Fourdan <ofourdan@redhat.com>
Fri, 20 Mar 2020 14:24:06 +0000 (15:24 +0100)
committerOlivier Fourdan <ofourdan@redhat.com>
Mon, 30 Mar 2020 16:25:36 +0000 (18:25 +0200)
commit83027c68f112eff618a36682ad90a87a76bb92ef
tree3ed5425589382a39305c3a4d82fd1653c87ab534
parent44931a66dfa8560e98501c0a0a371d9a642fb4c6
x11: Implement inhibit_system_shortcuts API

On X11, there is no such equivalent to the inhibit shortcut protocol
found on Wayland.

To implement the inhibit_system_shortcuts API on X11, we emulate the
same behavior using grabs on the keyboard.

To avoid keeping active grabs on the keyboard that would affect other
X11 applications even when the surface isn't focused, the X11
implementation takes care of releasing the grabs as soon as the toplevel
loses focus.
gdk/x11/gdksurface-x11.c