[gnome-control-center/gnome-3-20] universal-access: Specify a window when testing visual bell
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-20] universal-access: Specify a window when testing visual bell
- Date: Wed, 13 Apr 2016 11:46:10 +0000 (UTC)
commit 18bc213dc4c841d25e4ee56ddc6d772b1e0c41a9
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Apr 7 17:26:06 2016 +0200
universal-access: Specify a window when testing visual bell
When testing the window title flash, we should make sure that there
is a window to flash instead of relying on the compositor to pick
one for us.
https://bugzilla.gnome.org/show_bug.cgi?id=754810
panels/universal-access/cc-ua-panel.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/panels/universal-access/cc-ua-panel.c b/panels/universal-access/cc-ua-panel.c
index 0a138f9..477a689 100644
--- a/panels/universal-access/cc-ua-panel.c
+++ b/panels/universal-access/cc-ua-panel.c
@@ -519,6 +519,14 @@ visual_bell_type_toggle_cb (GtkWidget *button,
}
static void
+test_flash (GtkButton *button,
+ gpointer data)
+{
+ GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (button));
+ gdk_window_beep (gtk_widget_get_window (toplevel));
+}
+
+static void
cc_ua_panel_init_hearing (CcUaPanel *self)
{
CcUaPanelPrivate *priv = self->priv;
@@ -568,7 +576,7 @@ cc_ua_panel_init_hearing (CcUaPanel *self)
G_CALLBACK (gtk_widget_hide_on_delete), NULL);
g_signal_connect (WID ("visual_alerts_test_button"),
- "clicked", G_CALLBACK (gdk_beep), NULL);
+ "clicked", G_CALLBACK (test_flash), NULL);
}
/* typing/keyboard section */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]