Add comments

This commit is contained in:
Isaac Mills
2024-11-26 12:41:15 -07:00
parent e163f74d41
commit 766aee61e2
2 changed files with 4 additions and 0 deletions

View File

@ -1163,6 +1163,7 @@ fn newWindow(self: *App, parent_: ?*CoreSurface, hidden: bool) !void {
// freed when the window is closed.
var window = try Window.create(alloc, self, hidden);
// The window should be destroyed if hidden == true
if (!hidden) {
// Add our initial tab
try window.newTab(parent_);

View File

@ -361,6 +361,9 @@ pub fn init(self: *Window, app: *App, hidden: bool) !void {
// Show the window
c.gtk_widget_show(window);
// Showing the window widget should be enough to clear
// the startup hurdle of initializing EGL for the first
// time. Now we just need to hide and deinit the window
if (hidden) {
c.gtk_widget_hide(window);
c.gtk_window_destroy(gtk_window);