GNOME Bugzilla – Bug 763001
implement beeping
Last modified: 2016-03-10 05:06:59 UTC
Beeping is a requirement for some a11y features (slow keys, etc). Since we don't have Wayland protocol for this, I'm attaching a quick implementation that uses libcanberra on the client-side.
Created attachment 322892 [details] [review] wayland: Link against libcanberra This will be used in the subsequent commits to implement gdk_display_beep() for Wayland.
Created attachment 322893 [details] [review] wayland: Add private api to get a ca_context Make GdkWaylandScreen keep a ca_context and make it available via private API. We also update the context when sound-related settings change.
Created attachment 322894 [details] [review] wayland: Use libcanberra to implement beeping The ability to beep in certain situations is a requirement for some accessibility features. Since there is no Wayland protocol for this (and it is not sure if there should be), use libcanberra for this.
Created attachment 323347 [details] [review] wayland: Don't invent our own unstable protocol semantics The gtk_shell protocol used some half baked unstable protocol semantics that worked by only allowing binding the exact version of the interface. This hack is a bit too confusing and it makes it impossible to do any compatible changes without breaking things. So, instead rename it to include a number in the interface names. This way we can add requests and events without causing compatibility issues, and we can later remove requests and events by bumping the number in the interface names.
Created attachment 323348 [details] [review] wayland: Add system bell support via gtk_shell Invoke the system bell by calling the request added to the gtk_shell protocol.
Those two patches are if we want to put the system bell in the compositor. They need the mutter patches from bug 763284. Note that the first patch is not bell-related but just here to catch up with the protocol stability cleanup patch from the mutter bug.
Review of attachment 323347 [details] [review]: This looks ok to me. Just strip all the whitespace changes in gdkscreen-wayland.c gdkwindow-sayland.c and gdkdisplay-wayland.h
(In reply to Matthias Clasen from comment #7) > Review of attachment 323347 [details] [review] [review]: > > This looks ok to me. Just strip all the whitespace changes in > gdkscreen-wayland.c gdkwindow-sayland.c and gdkdisplay-wayland.h Those whitespace changes are there because the indentation level changed, because all of the gtk_(shell|surface)_* functions now has an extra letter in them.
Ah, I didn't pick up on that
Review of attachment 323348 [details] [review]: Looks good to me, thanks for putting that together.
Attachment 323347 [details] pushed as f68cf69 - wayland: Don't invent our own unstable protocol semantics Attachment 323348 [details] pushed as ed430dc - wayland: Add system bell support via gtk_shell