diff options
author | TingPing <tingping@tingping.se> | 2012-12-12 10:45:14 -0500 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2012-12-12 10:45:14 -0500 |
commit | c1ccb244dbacb82519c0e0f85c82f8c6898b2cf2 (patch) | |
tree | f585d890c43abc033192954326212fd83e50c954 /src | |
parent | c6d955ade738815ec119ae76db32a3fcc1ac5d72 (diff) |
Don't beep when window is active.
Diffstat (limited to 'src')
-rw-r--r-- | src/common/fe.h | 2 | ||||
-rw-r--r-- | src/common/text.c | 2 | ||||
-rw-r--r-- | src/fe-gtk/fe-gtk.c | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/common/fe.h b/src/common/fe.h index f1f3b484..4903ef0e 100644 --- a/src/common/fe.h +++ b/src/common/fe.h @@ -97,7 +97,7 @@ void fe_set_title (struct session *sess); void fe_set_nonchannel (struct session *sess, int state); void fe_set_nick (struct server *serv, char *newnick); void fe_ignore_update (int level); -void fe_beep (void); +void fe_beep (session *sess); void fe_lastlog (session *sess, session *lastlog_sess, char *sstr, gtk_xtext_search_flags flags); void fe_set_lag (server *serv, int lag); void fe_set_throttle (server *serv); diff --git a/src/common/text.c b/src/common/text.c index 0b8f9d0b..f57165be 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -2253,7 +2253,7 @@ sound_beep (session *sess) sound_play_event (XP_TE_BEEP); else /* system beep */ - fe_beep (); + fe_beep (sess); } static char * diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index f100b895..f589b1b0 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -682,9 +682,10 @@ fe_print_text (struct session *sess, char *text, time_t stamp) } void -fe_beep (void) +fe_beep (session *sess) { - gdk_beep (); + if (fe_gui_info (sess, 0) != 1) + gdk_beep (); } void |