mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 16:58:09 +02:00
Fix screen not being refreshed immediately after moving a window. Fixes #397
This commit is contained in:
@@ -569,7 +569,8 @@ simple_render_screen(PyObject UNUSED *self, PyObject *args) {
|
|||||||
static inline bool
|
static inline bool
|
||||||
prepare_to_render_os_window(OSWindow *os_window, double now, unsigned int *active_window_id, color_type *active_window_bg, unsigned int *num_visible_windows) {
|
prepare_to_render_os_window(OSWindow *os_window, double now, unsigned int *active_window_id, color_type *active_window_bg, unsigned int *num_visible_windows) {
|
||||||
#define TD os_window->tab_bar_render_data
|
#define TD os_window->tab_bar_render_data
|
||||||
bool needs_render = false;
|
bool needs_render = os_window->needs_render;
|
||||||
|
os_window->needs_render = false;
|
||||||
if (TD.screen && os_window->num_tabs > 1) {
|
if (TD.screen && os_window->num_tabs > 1) {
|
||||||
if (send_cell_data_to_gpu(TD.vao_idx, 0, TD.xstart, TD.ystart, TD.dx, TD.dy, TD.screen, os_window)) needs_render = true;
|
if (send_cell_data_to_gpu(TD.vao_idx, 0, TD.xstart, TD.ystart, TD.dx, TD.dy, TD.screen, os_window)) needs_render = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,6 +201,7 @@ static inline void
|
|||||||
set_active_tab(id_type os_window_id, unsigned int idx) {
|
set_active_tab(id_type os_window_id, unsigned int idx) {
|
||||||
WITH_OS_WINDOW(os_window_id)
|
WITH_OS_WINDOW(os_window_id)
|
||||||
os_window->active_tab = idx;
|
os_window->active_tab = idx;
|
||||||
|
os_window->needs_render = true;
|
||||||
END_WITH_OS_WINDOW
|
END_WITH_OS_WINDOW
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,6 +209,7 @@ static inline void
|
|||||||
set_active_window(id_type os_window_id, id_type tab_id, unsigned int idx) {
|
set_active_window(id_type os_window_id, id_type tab_id, unsigned int idx) {
|
||||||
WITH_TAB(os_window_id, tab_id)
|
WITH_TAB(os_window_id, tab_id)
|
||||||
tab->active_window = idx;
|
tab->active_window = idx;
|
||||||
|
osw->needs_render = true;
|
||||||
END_WITH_TAB;
|
END_WITH_TAB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ typedef struct {
|
|||||||
double viewport_x_ratio, viewport_y_ratio;
|
double viewport_x_ratio, viewport_y_ratio;
|
||||||
Tab *tabs;
|
Tab *tabs;
|
||||||
unsigned int active_tab, num_tabs, capacity, last_active_tab, last_num_tabs, last_active_window_id;
|
unsigned int active_tab, num_tabs, capacity, last_active_tab, last_num_tabs, last_active_window_id;
|
||||||
bool focused_at_last_render;
|
bool focused_at_last_render, needs_render;
|
||||||
ScreenRenderData tab_bar_render_data;
|
ScreenRenderData tab_bar_render_data;
|
||||||
bool is_focused;
|
bool is_focused;
|
||||||
double cursor_blink_zero_time, last_mouse_activity_at;
|
double cursor_blink_zero_time, last_mouse_activity_at;
|
||||||
|
|||||||
Reference in New Issue
Block a user