mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
apprt/gtk: when dragging tab out, grab focus
This commit is contained in:
@ -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(
|
||||||
|
Reference in New Issue
Block a user