When moving windows to a new tab/OS Window fix overlay windows not being grouped with their parent windows

Fixes #9266
This commit is contained in:
Kovid Goyal 2025-12-04 07:49:48 +05:30
parent 3b78fd646e
commit 8e15e14538
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
3 changed files with 9 additions and 3 deletions

View file

@ -184,6 +184,9 @@ Detailed list of changes
- Wayland: Fix spurious key repeat events when some user defined callback takes
a long time to execute (:iss:`9224`)
- When moving windows to a new tab/OS Window fix overlay windows not being
grouped with their parent windows (:iss:`9266`)
0.44.0 [2025-11-03]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -3079,8 +3079,11 @@ def _move_window_to(
else:
return
overlay_for = 0
for detached_window in src_tab.detach_window(window):
target_tab.attach_window(detached_window)
target_tab.attach_window(detached_window, overlay_for=overlay_for)
if overlay_for == 0:
overlay_for = detached_window.id
self._cleanup_tab_after_window_removal(src_tab)
target_tab.make_active()

View file

@ -752,10 +752,10 @@ def detach_window(self, window: Window) -> tuple[Window, ...]:
self.remove_window(w, destroy=False)
return tuple(windows)
def attach_window(self, window: Window) -> None:
def attach_window(self, window: Window, overlay_for: int = 0) -> None:
window.change_tab(self)
attach_window(self.os_window_id, self.id, window.id)
self._add_window(window)
self._add_window(window, overlay_for=overlay_for)
def set_active_window(self, x: Window | int, for_keep_focus: Window | None = None) -> None:
self.windows.set_active_window_group_for(x, for_keep_focus=for_keep_focus)