mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-09-01 06:41:30 +00:00
Don't report color scheme preference change when it is changed via escape code
This commit is contained in:
parent
f3db7e7554
commit
6fbeb939de
2 changed files with 5 additions and 5 deletions
|
|
@ -1547,10 +1547,10 @@ class Boss:
|
|||
return tab
|
||||
return None
|
||||
|
||||
def default_bg_changed_for(self, window_id: int) -> None:
|
||||
def default_bg_changed_for(self, window_id: int, via_escape_code: bool = False) -> None:
|
||||
w = self.window_id_map.get(window_id)
|
||||
if w is not None:
|
||||
w.on_color_scheme_preference_change()
|
||||
w.on_color_scheme_preference_change(via_escape_code=via_escape_code)
|
||||
tm = self.os_window_map.get(w.os_window_id)
|
||||
if tm is not None:
|
||||
tm.update_tab_bar_data()
|
||||
|
|
|
|||
|
|
@ -1323,10 +1323,10 @@ class Window:
|
|||
if dirtied:
|
||||
self.screen.mark_as_dirty()
|
||||
if default_bg_changed:
|
||||
get_boss().default_bg_changed_for(self.id)
|
||||
get_boss().default_bg_changed_for(self.id, via_escape_code=True)
|
||||
|
||||
def on_color_scheme_preference_change(self) -> None:
|
||||
if self.screen.color_preference_notification:
|
||||
def on_color_scheme_preference_change(self, via_escape_code: bool = False) -> None:
|
||||
if self.screen.color_preference_notification and not via_escape_code:
|
||||
self.report_color_scheme_preference()
|
||||
|
||||
def report_color_scheme_preference(self) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue