Merge pull request #1820 from ghostty-org/gtk

apprt/gtk: when dragging tab out, grab focus
This commit is contained in:
Mitchell Hashimoto
2024-06-03 14:46:14 -07:00
committed by GitHub

View File

@ -315,9 +315,15 @@ fn gtkPageAdded(
_: c.guint, _: c.guint,
ud: ?*anyopaque, ud: ?*anyopaque,
) callconv(.C) void { ) callconv(.C) void {
const self = userdataSelf(ud.?);
_ = self;
_ = child; _ = child;
const self = userdataSelf(ud.?);
// Whenever a new page is added, we always grab focus of the
// currently selected page. This was added specifically so that when
// we drag a tab out to create a new window ("create-window" event)
// we grab focus in the new window. Without this, the terminal didn't
// have focus.
self.focusCurrentTab();
} }
fn gtkPageRemoved( fn gtkPageRemoved(