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 763284 - [Wayland] Add system bell support
[Wayland] Add system bell support
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 756289 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-03-08 04:17 UTC by Jonas Ådahl
Modified: 2016-03-14 14:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Don't invent our own unstable protocol semantics (6.06 KB, patch)
2016-03-08 04:17 UTC, Jonas Ådahl
committed Details | Review
wayland: Namespace gtk_shell request handlers (1.85 KB, patch)
2016-03-08 04:17 UTC, Jonas Ådahl
committed Details | Review
bell: Let the X11 caller deal with the X11 fallback (4.48 KB, patch)
2016-03-08 04:17 UTC, Jonas Ådahl
committed Details | Review
wayland: Add system bell support via gtk_shell (2.35 KB, patch)
2016-03-08 04:17 UTC, Jonas Ådahl
committed Details | Review
bell: Flash whole window if the window had no frame (4.15 KB, patch)
2016-03-08 04:17 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2016-03-08 04:17:36 UTC
Attached to this bug are patches that adds system bell protocol support to gtk_shell and an implementation.

The two first patches are only preparatory patches that don't have anything to do with system bells.
Comment 1 Jonas Ådahl 2016-03-08 04:17:40 UTC
Created attachment 323342 [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 2 Jonas Ådahl 2016-03-08 04:17:45 UTC
Created attachment 323343 [details] [review]
wayland: Namespace gtk_shell request handlers
Comment 3 Jonas Ådahl 2016-03-08 04:17:50 UTC
Created attachment 323344 [details] [review]
bell: Let the X11 caller deal with the X11 fallback

To support invoking the system bell on Wayland we shouldn't have paths
that fallback to X11. Let the X11 caller deal with the absence of
libcanberra, and change API to not take any X events.
Comment 4 Jonas Ådahl 2016-03-08 04:17:54 UTC
Created attachment 323345 [details] [review]
wayland: Add system bell support via gtk_shell

Add a system_bell request to gtk_shell. A client can use this to invoke
the system bell, be it aural, visual or none at all. Currently per
window visual bell support is not implemented.
Comment 5 Jonas Ådahl 2016-03-08 04:17:59 UTC
Created attachment 323346 [details] [review]
bell: Flash whole window if the window had no frame

CSD X11 clients and Wayland clients don't have a window frame drawn by
the compositor to flash. So instead of flashing the whole screen when
configured to just flash the window, flash just the window region.
Comment 6 Rui Matos 2016-03-09 00:55:16 UTC
Review of attachment 323346 [details] [review]:

looks, feel free to ignore the nits below

::: src/compositor/compositor-private.h
@@ +61,3 @@
                                                       gint64       monotonic_time);
 
+void meta_compositor_flash_window (MetaCompositor *compositor,

For consistency, this could go into meta/compositor.h with the fullscreen method

::: src/compositor/compositor.c
@@ +1287,3 @@
+
+  g_signal_connect (transition, "stopped",
+                    G_CALLBACK (window_flash_out_completed), flash);

nit: could use a g_signal_connect_swapped(transition, "stopped", G_CALLBACK (clutter_actor_destroy), flash) to avoid having to declare a single line function

(I know the fullscreen method doesn't do this either)
Comment 7 Rui Matos 2016-03-09 00:55:25 UTC
Review of attachment 323345 [details] [review]:

fine
Comment 8 Rui Matos 2016-03-09 00:56:14 UTC
Review of attachment 323344 [details] [review]:

fine, just a couple of doc nits, feel free to push as is though

::: src/core/bell.h
@@ +26,3 @@
  * meta_bell_notify:
  * @display: The display the bell event came in on
+ * @window: The window the bell event as received on

s/as/was/

@@ +30,3 @@
+ * Gives the user some kind of aural or visual feedback, such as a bell sound
+ * or flash. What type of feedback is invoked depends on the configuration.
+ * If the feedback could not be invoked, FALSE is returned.

The visual feedback might still be invoked even if FALSE is returned though
Comment 9 Rui Matos 2016-03-09 00:56:26 UTC
Review of attachment 323343 [details] [review]:

ok
Comment 10 Rui Matos 2016-03-09 00:56:32 UTC
Review of attachment 323342 [details] [review]:

++
Comment 11 Jonas Ådahl 2016-03-10 05:06:32 UTC
Attachment 323342 [details] pushed as fea1ddc - wayland: Don't invent our own unstable protocol semantics
Attachment 323343 [details] pushed as 9f1d115 - wayland: Namespace gtk_shell request handlers
Attachment 323344 [details] pushed as 417cb2b - bell: Let the X11 caller deal with the X11 fallback
Attachment 323345 [details] pushed as 4af908a - wayland: Add system bell support via gtk_shell
Attachment 323346 [details] pushed as 99bba9e - bell: Flash whole window if the window had no frame
Comment 12 Rui Matos 2016-03-14 14:13:23 UTC
*** Bug 756289 has been marked as a duplicate of this bug. ***