mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 01:06:08 +03:00
apprt/gtk: rename parent2 to parent
This commit is contained in:
@ -50,7 +50,7 @@ pub fn init(
|
|||||||
// Create the new child surface
|
// Create the new child surface
|
||||||
const alloc = sibling.app.core_app.alloc;
|
const alloc = sibling.app.core_app.alloc;
|
||||||
var surface = try Surface.create(alloc, sibling.app, .{
|
var surface = try Surface.create(alloc, sibling.app, .{
|
||||||
.parent2 = &sibling.core_surface,
|
.parent = &sibling.core_surface,
|
||||||
});
|
});
|
||||||
errdefer surface.destroy(alloc);
|
errdefer surface.destroy(alloc);
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ pub const opengl_single_threaded_draw = true;
|
|||||||
pub const Options = struct {
|
pub const Options = struct {
|
||||||
/// The parent surface to inherit settings such as font size, working
|
/// The parent surface to inherit settings such as font size, working
|
||||||
/// directory, etc. from.
|
/// directory, etc. from.
|
||||||
parent2: ?*CoreSurface = null,
|
parent: ?*CoreSurface = null,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The container that this surface is directly attached to.
|
/// The container that this surface is directly attached to.
|
||||||
@ -291,7 +291,7 @@ pub fn init(self: *Surface, app: *App, opts: Options) !void {
|
|||||||
// Inherit the parent's font size if we have a parent.
|
// Inherit the parent's font size if we have a parent.
|
||||||
const font_size: ?font.face.DesiredSize = font_size: {
|
const font_size: ?font.face.DesiredSize = font_size: {
|
||||||
if (!app.config.@"window-inherit-font-size") break :font_size null;
|
if (!app.config.@"window-inherit-font-size") break :font_size null;
|
||||||
const parent = opts.parent2 orelse break :font_size null;
|
const parent = opts.parent orelse break :font_size null;
|
||||||
break :font_size parent.font_size;
|
break :font_size parent.font_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ pub fn init(self: *Surface, app: *App, opts: Options) !void {
|
|||||||
.title_text_buf_len = 0,
|
.title_text_buf_len = 0,
|
||||||
.core_surface = undefined,
|
.core_surface = undefined,
|
||||||
.font_size = font_size,
|
.font_size = font_size,
|
||||||
.parentSurface = opts.parent2 != null,
|
.parentSurface = opts.parent != null,
|
||||||
.size = .{ .width = 800, .height = 600 },
|
.size = .{ .width = 800, .height = 600 },
|
||||||
.cursor_pos = .{ .x = 0, .y = 0 },
|
.cursor_pos = .{ .x = 0, .y = 0 },
|
||||||
.im_context = im_context,
|
.im_context = im_context,
|
||||||
|
@ -94,7 +94,7 @@ pub fn init(self: *Tab, window: *Window, parent_: ?*CoreSurface) !void {
|
|||||||
|
|
||||||
// Create the initial surface since all tabs start as a single non-split
|
// Create the initial surface since all tabs start as a single non-split
|
||||||
var surface = try Surface.create(window.app.core_app.alloc, window.app, .{
|
var surface = try Surface.create(window.app.core_app.alloc, window.app, .{
|
||||||
.parent2 = parent_,
|
.parent = parent_,
|
||||||
});
|
});
|
||||||
errdefer surface.unref();
|
errdefer surface.unref();
|
||||||
surface.container = .{ .tab_ = self };
|
surface.container = .{ .tab_ = self };
|
||||||
|
Reference in New Issue
Block a user