mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-22 13:12:23 +00:00
DRYer
This commit is contained in:
parent
96c01b74d8
commit
5e84935838
2 changed files with 3 additions and 3 deletions
|
|
@ -1916,7 +1916,7 @@ class Boss:
|
|||
tm.on_tab_drop(x, y)
|
||||
set_tab_being_dragged()
|
||||
for tm in self.all_tab_managers:
|
||||
tm.on_tab_drop_move(0, False, 0, 0)
|
||||
tm.on_tab_drop_move()
|
||||
tm.layout_tab_bar() # ensure tab bar is fully updated
|
||||
return
|
||||
central, tab_bar = viewport_for_window(os_window_id)[:2]
|
||||
|
|
@ -1939,7 +1939,7 @@ class Boss:
|
|||
if data and (tidb := data.get(f'application/net.kovidgoyal.kitty-tab-{os.getpid()}')):
|
||||
set_tab_being_dragged()
|
||||
for tm in self.all_tab_managers:
|
||||
tm.on_tab_drop_move(0, False, 0, 0)
|
||||
tm.on_tab_drop_move()
|
||||
if not was_dropped: # detach tab into new OS Window
|
||||
tab_id = int(tidb.decode())
|
||||
if (tab := self.tab_for_id(tab_id)):
|
||||
|
|
|
|||
|
|
@ -1566,7 +1566,7 @@ class TabManager: # {{{
|
|||
self.tabs[pos] = id_map[tab_id]
|
||||
reorder_tabs(self.os_window_id, *(t.id for t in self.tabs))
|
||||
|
||||
def on_tab_drop_move(self, tab_id: int, is_dest: bool, x: int, y: int) -> None:
|
||||
def on_tab_drop_move(self, tab_id: int = 0, is_dest: bool = False, x: int = 0, y: int = 0) -> None:
|
||||
if not is_dest:
|
||||
if self.tab_being_dropped:
|
||||
self.tab_being_dropped = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue