Add an option to not request window attention on bell. Fixes #507
This commit is contained in:
parent
4760580d1c
commit
053835afbe
@ -351,6 +351,7 @@ type_map = {
|
||||
'inactive_text_alpha': unit_float,
|
||||
'url_style': url_style,
|
||||
'copy_on_select': to_bool,
|
||||
'window_alert_on_bell': to_bool,
|
||||
'tab_bar_edge': tab_bar_edge,
|
||||
'kitty_mod': to_modifiers,
|
||||
'clear_all_shortcuts': to_bool,
|
||||
|
||||
@ -620,7 +620,7 @@ request_window_attention(id_type kitty_window_id, bool audio_bell) {
|
||||
OSWindow *w = os_window_for_kitty_window(kitty_window_id);
|
||||
if (w) {
|
||||
if (audio_bell) ring_audio_bell(w);
|
||||
glfwRequestWindowAttention(w->handle);
|
||||
if (OPT(window_alert_on_bell)) glfwRequestWindowAttention(w->handle);
|
||||
glfwPostEmptyEvent();
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,6 +166,10 @@ visual_bell_duration 0.0
|
||||
|
||||
# Enable/disable the audio bell. Useful in environments that require silence.
|
||||
enable_audio_bell yes
|
||||
|
||||
# Request window attention on bell.
|
||||
# Makes the dock icon bounce on macOS or the taskbar flash on linux.
|
||||
window_alert_on_bell yes
|
||||
# }}}
|
||||
|
||||
|
||||
|
||||
@ -373,6 +373,7 @@ PYWRAP1(set_options) {
|
||||
S(input_delay, repaint_delay);
|
||||
S(sync_to_monitor, PyObject_IsTrue);
|
||||
S(close_on_child_death, PyObject_IsTrue);
|
||||
S(window_alert_on_bell, PyObject_IsTrue);
|
||||
S(macos_option_as_alt, PyObject_IsTrue);
|
||||
S(macos_hide_titlebar, PyObject_IsTrue);
|
||||
S(macos_hide_from_tasks, PyObject_IsTrue);
|
||||
|
||||
@ -32,6 +32,7 @@ typedef struct {
|
||||
Edge tab_bar_edge;
|
||||
bool sync_to_monitor;
|
||||
bool close_on_child_death;
|
||||
bool window_alert_on_bell;
|
||||
} Options;
|
||||
|
||||
typedef struct {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user