render on cursor shape change as well

This commit is contained in:
Kovid Goyal 2018-02-20 11:54:35 +05:30
parent d5edea3c7f
commit 68bf1be8d0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 2 deletions

View File

@ -593,7 +593,7 @@ prepare_to_render_os_window(OSWindow *os_window, double now, unsigned int *activ
if (is_active_window) {
*active_window_id = w->id;
collect_cursor_info(&WD.screen->cursor_render_info, w, now, os_window);
if (w->cursor_visible_at_last_render != WD.screen->cursor_render_info.is_visible || w->last_cursor_x != WD.screen->cursor_render_info.x || w->last_cursor_y != WD.screen->cursor_render_info.y) needs_render = true;
if (w->cursor_visible_at_last_render != WD.screen->cursor_render_info.is_visible || w->last_cursor_x != WD.screen->cursor_render_info.x || w->last_cursor_y != WD.screen->cursor_render_info.y || w->last_cursor_shape != WD.screen->cursor_render_info.shape) needs_render = true;
update_window_title(w, os_window);
*active_window_bg = colorprofile_to_color(WD.screen->color_profile, WD.screen->color_profile->overridden.default_bg, WD.screen->color_profile->configured.default_bg);
} else WD.screen->cursor_render_info.is_visible = false;
@ -622,7 +622,7 @@ render_os_window(OSWindow *os_window, double now, unsigned int active_window_id,
double bell_left = global_state.opts.visual_bell_duration - (now - WD.screen->start_visual_bell_at);
set_maximum_wait(bell_left);
}
w->cursor_visible_at_last_render = WD.screen->cursor_render_info.is_visible; w->last_cursor_x = WD.screen->cursor_render_info.x; w->last_cursor_y = WD.screen->cursor_render_info.y;
w->cursor_visible_at_last_render = WD.screen->cursor_render_info.is_visible; w->last_cursor_x = WD.screen->cursor_render_info.x; w->last_cursor_y = WD.screen->cursor_render_info.y; w->last_cursor_shape = WD.screen->cursor_render_info.shape;
}
}
swap_window_buffers(os_window);

View File

@ -58,6 +58,7 @@ typedef struct {
id_type id;
bool visible, cursor_visible_at_last_render;
unsigned int last_cursor_x, last_cursor_y;
CursorShape last_cursor_shape;
PyObject *title;
ScreenRenderData render_data;
unsigned int mouse_cell_x, mouse_cell_y;