]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
terminal.c should call the frontend beep() routine even with
authorSimon Tatham <anakin@pobox.com>
Mon, 28 Oct 2002 21:58:07 +0000 (21:58 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 28 Oct 2002 21:58:07 +0000 (21:58 +0000)
mode==BELL_VISUAL, otherwise taskbar flashing won't happen on visual
bells. It's up to the frontend routine to spot BELL_VISUAL and avoid
making any noise.

[originally from svn r2155]

terminal.c
unix/pterm.c

index eb5d9074a9118660e474f0baf05096fb343fcf6c..1e0a9fe407979add077dd82ca4e397873105bcc2 100644 (file)
@@ -1373,12 +1373,12 @@ void term_out(Terminal *term)
                     * Perform an actual beep if we're not overloaded.
                     */
                    if (!cfg.bellovl || !term->beep_overloaded) {
+                       beep(term->frontend, cfg.beep);
                        if (cfg.beep == BELL_VISUAL) {
                            term->in_vbell = TRUE;
                            term->vbell_startpoint = ticks;
                            term_update(term);
-                       } else
-                           beep(term->frontend, cfg.beep);
+                       }
                    }
                    term->disptop = 0;
                }
index 947e4411d810772b8974d27d594080d3c6752165..4113e510dc689100ac5b75dce339a13c31afedc8 100644 (file)
@@ -1332,9 +1332,16 @@ void sys_cursor(void *frontend, int x, int y)
      */
 }
 
+/*
+ * This is still called when mode==BELL_VISUAL, even though the
+ * visual bell is handled entirely within terminal.c, because we
+ * may want to perform additional actions on any kind of bell (for
+ * example, taskbar flashing in Windows).
+ */
 void beep(void *frontend, int mode)
 {
-    gdk_beep();
+    if (mode != BELL_VISUAL)
+       gdk_beep();
 }
 
 int CharWidth(Context ctx, int uc)