[Wayland-bugs] [Bug 791057] [wayland] Gtk4 API - add an api for shortcut inhibitor since individual device grabs shall/should probably go
gtk+ (GNOME Bugzilla)
bugzilla at gnome.org
Tue Jan 16 13:45:55 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=791057
--- Comment #1 from Olivier Fourdan <ofourdan at redhat.com> ---
So, discussing this with Jonas and Carlos on irc, Jonas is in favor of an
specific API for that but Carlos not so much:
11:48 <@garnacho> ofourdan: GdkSeat and its grabs aren't going away :)
12:01 < ofourdan> garnacho: but...
https://bugzilla.gnome.org/show_bug.cgi?id=789268#c20
12:01 < bugbot> Bug 789268: Backend: Wayland, normal, gtk-bugs,
RESOLVED FIXED, Keyboard grab by popup window causes a
session-modal shortcut-inhibition dialog
12:02 <@garnacho> ofourdan: I meant gdk_device_grab with "individual
device grabs"
12:04 < ofourdan> garnacho: ok, so you'd be in favour of keeping
wayland shortcut inhibition hidden behind the
(existing) grab API or should we move it to a
specific API (possibly using grabs on platforms such
as x11)?
12:12 <@garnacho> ofourdan: I'm afraid of making it a separate API call
precisely because support would be spotty across
backends. It feels too oddly specific to be honored
properly in some (eg. no idea about win32 and quartz)
12:12 < ofourdan> yeah same here, I know nothing about any backends but
x11 and wayland
12:13 <@garnacho> otoh, gdk_seat_grab already has iffy promises across
backends... :)
12:13 < ofourdan> I was thinking we could make a specific API that
would issue a grab when the window is focused, and
release it when unfocused, so we would match the
Wayland behaviour
12:13 < ofourdan> but maybe it's overkill
12:18 <@garnacho> would be a fine place to set up pointer confinement
if we ever added support for that. but yeah, seems a
strange wayland detail to be leaked in api
12:20 <@garnacho> ofourdan: IMHO the second chunk of the patch reviewed
in that bz comment you pasted is good to get in
12:22 < ofourdan> the one affecting gdk_wayland_seat_grab() ?
12:22 < ofourdan> makes sense
13:59 < ofourdan> garnacho, probably a crazy idea, but we could make it
a separate api by (ab)using the GdkSeatCapabilities,
like adding a GDK_SEAT_CAPABILITY_KEYBOARD_SHORTCUTS
that could be explicitly grabbed on Wayland...?
14:01 < ofourdan> (the idea being that apps remain in control instead
of trying to come up with heuristics as to when issue a
shortcut inhibition request)
14:08 <@garnacho> ofourdan: I prefer that to an extra api call, indeed
:)
14:09 < ofourdan> really?
14:11 <@garnacho> ofourdan: well, at least the "can't make deep
promises" api doesn't spread. and it would also set
up a precedent to separate other grabbing patterns
into semantic api, which I'm unsure about
14:16 < ofourdan> (we can even report the
GDK_SEAT_CAPABILITY_KEYBOARD_SHORTCUTS in
gdk_wayland_seat_get_capabilities() only when the
compositor supports the shortcut inhibitor protocol,
neat...)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20180116/47393a50/attachment.html>
More information about the wayland-bugs
mailing list