Update padding color on colorprofile pop

This commit is contained in:
Kovid Goyal 2022-03-23 08:35:36 +05:30
parent aabc99c7bf
commit 49c335972f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 10 additions and 1 deletions

View File

@ -2092,7 +2092,12 @@ screen_push_colors(Screen *self, unsigned int idx) {
void void
screen_pop_colors(Screen *self, unsigned int idx) { screen_pop_colors(Screen *self, unsigned int idx) {
if (colorprofile_pop_colors(self->color_profile, idx)) self->color_profile->dirty = true; color_type bg_before = colorprofile_to_color(self->color_profile, self->color_profile->overridden.default_bg, self->color_profile->configured.default_bg).rgb;
if (colorprofile_pop_colors(self->color_profile, idx)) {
self->color_profile->dirty = true;
color_type bg_after = colorprofile_to_color(self->color_profile, self->color_profile->overridden.default_bg, self->color_profile->configured.default_bg).rgb;
CALLBACK("color_profile_popped", "O", bg_before == bg_after ? Py_False : Py_True);
}
} }
void void

View File

@ -862,6 +862,10 @@ class Window:
if default_bg_changed: if default_bg_changed:
get_boss().default_bg_changed_for(self.id) get_boss().default_bg_changed_for(self.id)
def color_profile_popped(self, bg_changed: bool) -> None:
if bg_changed:
get_boss().default_bg_changed_for(self.id)
def report_color(self, code: str, r: int, g: int, b: int) -> None: def report_color(self, code: str, r: int, g: int, b: int) -> None:
r |= r << 8 r |= r << 8
g |= g << 8 g |= g << 8