From 0ce89525af77efe89d35cc4eb48945a57b9f08c0 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 28 Oct 2002 21:58:07 +0000 Subject: [PATCH] terminal.c should call the frontend beep() routine even with 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. git-svn-id: svn://svn.tartarus.org/sgt/putty@2155 cda61777-01e9-0310-a592-d414129be87e --- terminal.c | 4 ++-- unix/pterm.c | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/terminal.c b/terminal.c index eb5d9074..1e0a9fe4 100644 --- a/terminal.c +++ b/terminal.c @@ -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; } diff --git a/unix/pterm.c b/unix/pterm.c index 947e4411..4113e510 100644 --- a/unix/pterm.c +++ b/unix/pterm.c @@ -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) -- 2.11.0