Page MenuHomeFreeBSD

D32620.diff
No OneTemporary

D32620.diff

diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h
--- a/sys/dev/vt/vt.h
+++ b/sys/dev/vt/vt.h
@@ -308,6 +308,8 @@
struct vt_mode vw_smode; /* switch mode */
struct callout vw_proc_dead_timer;
struct vt_window *vw_switch_to;
+ int vw_bell_pitch; /* (?) Bell pitch */
+ sbintime_t vw_bell_duration; /* (?) Bell duration */
};
#define VT_AUTO 0 /* switching is automatic */
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -257,6 +257,8 @@
.vw_terminal = &vt_consterm,
.vw_kbdmode = K_XLATE,
.vw_grabbed = 0,
+ .vw_bell_pitch = VT_BELLPITCH,
+ .vw_bell_duration = VT_BELLDURATION,
};
struct terminal vt_consterm = {
.tm_class = &vt_termclass,
@@ -1100,7 +1102,11 @@
if (vd->vd_flags & VDF_QUIET_BELL)
return;
- sysbeep(VT_BELLPITCH, VT_BELLDURATION);
+ if (vw->vw_bell_pitch == 0 ||
+ vw->vw_bell_duration == 0)
+ return;
+
+ sysbeep(vw->vw_bell_pitch, vw->vw_bell_duration);
}
static void
@@ -1177,6 +1183,11 @@
case TP_MOUSE:
vw->vw_mouse_level = arg;
break;
+ case TP_SETBELLPD:
+ vw->vw_bell_pitch = TP_SETBELLPD_PITCH(arg);
+ vw->vw_bell_duration =
+ TICKS_2_MSEC(TP_SETBELLPD_DURATION(arg)) * SBT_1MS;
+ break;
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 12, 10:33 AM (21 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15768512
Default Alt Text
D32620.diff (1 KB)

Event Timeline