diff --git a/kitty/boss.py b/kitty/boss.py index 8dc58060c..0cc9528b5 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -1934,7 +1934,7 @@ class Boss: window_id, drag_started = get_window_being_dragged()[:2] if window_id and drag_started: for q in self.all_tab_managers: - q.on_window_drop_move(window_id, not is_leave, x, y) + q.on_window_drop_move(window_id, (not is_leave) and (q is tm), x, y) def on_drop(self, os_window_id: int, drop: dict[str, bytes] | int, from_self: bool, x: int, y: int) -> None: if isinstance(drop, int): diff --git a/kitty/tabs.py b/kitty/tabs.py index 5d528ff84..3861a8d36 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -1644,9 +1644,9 @@ class TabManager: # {{{ self.layout_tab_bar() return if self.tab_bar_should_be_visible: - all_tabs = [t.tab_id for t in self.tab_bar.last_laid_out_tabs] + all_tabs = [t.tab_id for t in self.tab_bar.last_laid_out_tabs if t.tab_id >= 0] else: - all_tabs = [t.tab_id for t in self.tab_bar_data] + all_tabs = [t.tab_id for t in self.tab_bar_data if t.tab_id >= 0] force_update = False if self.tab_being_dropped is None: tab = get_boss().tab_for_id(tab_id)