Allow the user to control the resize debounce time via resize_debounce_time
This commit is contained in:
parent
c660840c19
commit
53df123c0d
@ -8,7 +8,7 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
---------------------
|
||||
|
||||
- macOS: The default behavior of the Option key has changed. It now generates
|
||||
unicode characters rather than acting as the Alt modifier. See
|
||||
unicode characters rather than acting as the :kbd:`Alt` modifier. See
|
||||
:opt:`macos_option_as_alt`.
|
||||
|
||||
- Support for an arbitrary number of internal clipboard buffers to copy/paste
|
||||
@ -117,6 +117,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
- When encountering errors in :file:`kitty.conf` report them to the user
|
||||
instead of failing to start.
|
||||
|
||||
- Allow the user to control the resize debounce time via
|
||||
:opt:`resize_debounce_time`.
|
||||
|
||||
|
||||
0.13.3 [2019-01-19]
|
||||
------------------------------
|
||||
|
||||
@ -831,10 +831,10 @@ process_pending_resizes(double now) {
|
||||
if (w->live_resize.from_os_notification) {
|
||||
if (w->live_resize.os_says_resize_complete || (now - w->live_resize.last_resize_event_at) > 1) update_viewport = true;
|
||||
} else {
|
||||
if (now - w->live_resize.last_resize_event_at >= RESIZE_DEBOUNCE_TIME) update_viewport = true;
|
||||
if (now - w->live_resize.last_resize_event_at >= OPT(resize_debounce_time)) update_viewport = true;
|
||||
else {
|
||||
global_state.has_pending_resizes = true;
|
||||
set_maximum_wait(RESIZE_DEBOUNCE_TIME - now + w->live_resize.last_resize_event_at);
|
||||
set_maximum_wait(OPT(resize_debounce_time) - now + w->live_resize.last_resize_event_at);
|
||||
}
|
||||
}
|
||||
if (update_viewport) {
|
||||
|
||||
@ -603,6 +603,12 @@ Hide the window decorations (title-bar and window borders).
|
||||
Whether this works and exactly what effect it has depends on the
|
||||
window manager/operating system.
|
||||
'''))
|
||||
|
||||
o('resize_debounce_time', 0.1, option_type=positive_float, long_text=_('''
|
||||
The time (in seconds) to wait before redrawing the screen when a
|
||||
resize event is received. On platforms such as macOS, where the
|
||||
operating system sends event corresponding to the start and end
|
||||
of a resize, this number is ignored.'''))
|
||||
# }}}
|
||||
|
||||
g('tabbar') # {{{
|
||||
|
||||
@ -387,6 +387,7 @@ PYWRAP1(set_options) {
|
||||
S(open_url_modifiers, convert_mods);
|
||||
S(rectangle_select_modifiers, convert_mods);
|
||||
S(click_interval, PyFloat_AsDouble);
|
||||
S(resize_debounce_time, PyFloat_AsDouble);
|
||||
S(url_color, color_as_int);
|
||||
S(background, color_as_int);
|
||||
S(foreground, color_as_int);
|
||||
|
||||
@ -40,6 +40,7 @@ typedef struct {
|
||||
bool close_on_child_death;
|
||||
bool window_alert_on_bell;
|
||||
bool debug_keyboard;
|
||||
double resize_debounce_time;
|
||||
} Options;
|
||||
|
||||
typedef struct {
|
||||
@ -178,8 +179,6 @@ extern GlobalState global_state;
|
||||
else Py_DECREF(cret_); \
|
||||
}
|
||||
|
||||
#define RESIZE_DEBOUNCE_TIME 0.2
|
||||
|
||||
void gl_init();
|
||||
void remove_vao(ssize_t vao_idx);
|
||||
bool remove_os_window(id_type os_window_id);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user