From 89f4cf11c79bb706949f9b29710e6170192f139a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 30 Nov 2023 21:46:43 -0800 Subject: [PATCH] apprt/gtk: rename parent2 to parent --- src/apprt/gtk/Split.zig | 2 +- src/apprt/gtk/Surface.zig | 6 +++--- src/apprt/gtk/Tab.zig | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/apprt/gtk/Split.zig b/src/apprt/gtk/Split.zig index c0c91c688..fce3f74ed 100644 --- a/src/apprt/gtk/Split.zig +++ b/src/apprt/gtk/Split.zig @@ -50,7 +50,7 @@ pub fn init( // Create the new child surface const alloc = sibling.app.core_app.alloc; var surface = try Surface.create(alloc, sibling.app, .{ - .parent2 = &sibling.core_surface, + .parent = &sibling.core_surface, }); errdefer surface.destroy(alloc); diff --git a/src/apprt/gtk/Surface.zig b/src/apprt/gtk/Surface.zig index 2286ecd2b..dfffdef0a 100644 --- a/src/apprt/gtk/Surface.zig +++ b/src/apprt/gtk/Surface.zig @@ -30,7 +30,7 @@ pub const opengl_single_threaded_draw = true; pub const Options = struct { /// The parent surface to inherit settings such as font size, working /// directory, etc. from. - parent2: ?*CoreSurface = null, + parent: ?*CoreSurface = null, }; /// 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. const font_size: ?font.face.DesiredSize = font_size: { 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; }; @@ -304,7 +304,7 @@ pub fn init(self: *Surface, app: *App, opts: Options) !void { .title_text_buf_len = 0, .core_surface = undefined, .font_size = font_size, - .parentSurface = opts.parent2 != null, + .parentSurface = opts.parent != null, .size = .{ .width = 800, .height = 600 }, .cursor_pos = .{ .x = 0, .y = 0 }, .im_context = im_context, diff --git a/src/apprt/gtk/Tab.zig b/src/apprt/gtk/Tab.zig index d8c006ce7..96acfea0a 100644 --- a/src/apprt/gtk/Tab.zig +++ b/src/apprt/gtk/Tab.zig @@ -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 var surface = try Surface.create(window.app.core_app.alloc, window.app, .{ - .parent2 = parent_, + .parent = parent_, }); errdefer surface.unref(); surface.container = .{ .tab_ = self };