After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763001 - implement beeping
implement beeping
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-03-02 17:50 UTC by Matthias Clasen
Modified: 2016-03-10 05:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Link against libcanberra (1.16 KB, patch)
2016-03-02 17:52 UTC, Matthias Clasen
none Details | Review
wayland: Add private api to get a ca_context (4.62 KB, patch)
2016-03-02 17:52 UTC, Matthias Clasen
none Details | Review
wayland: Use libcanberra to implement beeping (1.93 KB, patch)
2016-03-02 17:52 UTC, Matthias Clasen
none Details | Review
wayland: Don't invent our own unstable protocol semantics (11.05 KB, patch)
2016-03-08 04:19 UTC, Jonas Ådahl
committed Details | Review
wayland: Add system bell support via gtk_shell (2.92 KB, patch)
2016-03-08 04:19 UTC, Jonas Ådahl
committed Details | Review

Description Matthias Clasen 2016-03-02 17:50:58 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.
Comment 1 Matthias Clasen 2016-03-02 17:52:07 UTC
Created attachment 322892 [details] [review]
wayland: Link against libcanberra

This will be used in the subsequent commits to implement
gdk_display_beep() for Wayland.
Comment 2 Matthias Clasen 2016-03-02 17:52:21 UTC
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.
Comment 3 Matthias Clasen 2016-03-02 17:52:35 UTC
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.
Comment 4 Jonas Ådahl 2016-03-08 04:19:11 UTC
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.
Comment 5 Jonas Ådahl 2016-03-08 04:19:18 UTC
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.
Comment 6 Jonas Ådahl 2016-03-08 04:21:53 UTC
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.
Comment 7 Matthias Clasen 2016-03-09 01:04:28 UTC
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
Comment 8 Jonas Ådahl 2016-03-09 01:53:44 UTC
(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.
Comment 9 Matthias Clasen 2016-03-09 12:42:48 UTC
Ah, I didn't pick up on that
Comment 10 Matthias Clasen 2016-03-09 12:44:23 UTC
Review of attachment 323348 [details] [review]:

Looks good to me, thanks for putting that together.
Comment 11 Jonas Ådahl 2016-03-10 05:06:49 UTC
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