[metacity] bell: remove unused code



commit 5ad1d1c78be6f6645ddec7b37777b5a6f6efeace
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Tue Mar 16 15:25:16 2021 +0200

    bell: remove unused code

 src/core/bell.c | 23 -----------------------
 src/core/bell.h | 17 -----------------
 2 files changed, 40 deletions(-)
---
diff --git a/src/core/bell.c b/src/core/bell.c
index 034ddf70e..e5bf7c334 100644
--- a/src/core/bell.c
+++ b/src/core/bell.c
@@ -340,9 +340,6 @@ meta_bell_init (MetaDisplay *display)
     }
   else
     {
-      unsigned int mask = XkbBellNotifyMask;
-      gboolean visual_bell_auto_reset = FALSE;
-      /* TRUE if and when non-broken version is available */
       XkbSelectEvents (display->xdisplay,
                        XkbUseCoreKbd,
                        XkbBellNotifyMask,
@@ -352,32 +349,12 @@ meta_bell_init (MetaDisplay *display)
                                 XkbAudibleBellMask,
                                 0);
 
-      if (visual_bell_auto_reset)
-        {
-          XkbSetAutoResetControls (display->xdisplay,
-                                   XkbAudibleBellMask,
-                                   &mask,
-                                   &mask);
-        }
-
       return TRUE;
     }
 #endif
   return FALSE;
 }
 
-void
-meta_bell_shutdown (MetaDisplay *display)
-{
-#ifdef HAVE_XKB
-  /* TODO: persist initial bell state in display, reset here */
-  XkbChangeEnabledControls (display->xdisplay,
-                            XkbUseCoreKbd,
-                            XkbAudibleBellMask,
-                            XkbAudibleBellMask);
-#endif
-}
-
 /**
  * Deals with a frame being destroyed. This is important because if we're
  * using a visual bell, we might be flashing the edges of the frame, and
diff --git a/src/core/bell.h b/src/core/bell.h
index 19ec8326e..994e96653 100644
--- a/src/core/bell.h
+++ b/src/core/bell.h
@@ -75,26 +75,9 @@ void meta_bell_set_audible (MetaDisplay *display, gboolean audible);
  * function to be a no-op.
  *
  * \param display  The display which is opening
- *
- * \bug There is a line of code that's never run that tells
- * XKB to reset the bell status after we quit. Bill H said
- * (<http://bugzilla.gnome.org/show_bug.cgi?id=99886#c12>)
- * that XFree86's implementation is broken so we shouldn't
- * call it, but that was in 2002. Is it working now?
  */
 gboolean meta_bell_init (MetaDisplay *display);
 
-/**
- * Shuts down the bell subsystem.
- *
- * \param display  The display which is closing
- *
- * \bug This is never called! If we had XkbSetAutoResetControls
- * enabled in meta_bell_init(), this wouldn't be a problem, but
- * we don't.
- */
-void meta_bell_shutdown (MetaDisplay *display);
-
 /**
  * Deals with a frame being destroyed. This is important because if we're
  * using a visual bell, we might be flashing the edges of the frame, and


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]