diff options
author | Florian Müllner <fmuellner@gnome.org> | 2016-04-07 17:26:06 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2016-04-08 11:31:24 +0200 |
commit | 87bf4cc06e2a6480b692ab4031e1b4ea4af7fdd2 (patch) | |
tree | 08b3ac85dce420b9fd0ff74bae8f54bf0e69e458 /panels/universal-access | |
parent | 82b73e5e779b667279950d42f42d71eb30a22870 (diff) | |
download | gnome-control-center-87bf4cc06e2a6480b692ab4031e1b4ea4af7fdd2.tar.gz |
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
Diffstat (limited to 'panels/universal-access')
-rw-r--r-- | 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 0a138f96d..477a6895a 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 */ |