diff options
-rw-r--r-- | src/x11/meta-x11-display.c | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c index e9a73b249..665600938 100644 --- a/src/x11/meta-x11-display.c +++ b/src/x11/meta-x11-display.c @@ -490,6 +490,13 @@ init_x11_bell (MetaX11Display *x11_display) &mask); } } + + /* We are playing sounds using libcanberra support, we handle the + * bell whether its an audible bell or a visible bell */ + XkbChangeEnabledControls (x11_display->xdisplay, + XkbUseCoreKbd, + XkbAudibleBellMask, + 0); } /* @@ -507,32 +514,6 @@ shutdown_x11_bell (MetaX11Display *x11_display) XkbAudibleBellMask); } -/* - * Turns the bell to audible or visual. This tells X what to do, but - * not Mutter; you will need to set the "visual bell" pref for that. - */ -static void -set_x11_bell_is_audible (MetaX11Display *x11_display, - gboolean is_audible) -{ - /* When we are playing sounds using libcanberra support, we handle the - * bell whether its an audible bell or a visible bell */ - gboolean enable_system_bell = FALSE; - - XkbChangeEnabledControls (x11_display->xdisplay, - XkbUseCoreKbd, - XkbAudibleBellMask, - enable_system_bell ? XkbAudibleBellMask : 0); -} - -static void -on_is_audible_changed (MetaBell *bell, - gboolean is_audible, - MetaX11Display *x11_display) -{ - set_x11_bell_is_audible (x11_display, is_audible); -} - static void set_desktop_geometry_hint (MetaX11Display *x11_display) { @@ -1351,12 +1332,6 @@ meta_x11_display_new (MetaDisplay *display, GError **error) init_x11_bell (x11_display); - g_signal_connect_object (display->bell, "is-audible-changed", - G_CALLBACK (on_is_audible_changed), - x11_display, 0); - - set_x11_bell_is_audible (x11_display, meta_prefs_bell_is_audible ()); - meta_x11_startup_notification_init (x11_display); meta_x11_selection_init (x11_display); |