Update window logos on config reload

This commit is contained in:
Kovid Goyal 2021-12-03 13:47:14 +05:30
parent bfb87854df
commit bd1276d079
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -239,6 +239,7 @@ set_window_logo(Window *w, const char *path, const ImageAnchorPosition pos, bool
ok = true;
}
w->window_logo.using_default = is_default;
if (ok && w->render_data.screen) w->render_data.screen->is_dirty = true;
return ok;
}
@ -1005,7 +1006,15 @@ PYWRAP0(apply_options_update) {
get_platform_dependent_config_values(os_window->handle);
os_window->background_opacity = OPT(background_opacity);
os_window->is_damaged = true;
break;
for (size_t t = 0; t < os_window->num_tabs; t++) {
Tab *tab = os_window->tabs + t;
for (size_t w = 0; w < tab->num_windows; w++) {
Window *window = tab->windows + w;
if (window->window_logo.using_default) {
set_window_logo(window, OPT(default_window_logo), OPT(window_logo_position), true);
}
}
}
}
Py_RETURN_NONE;
}