mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Add comments
This commit is contained in:
@ -1163,6 +1163,7 @@ fn newWindow(self: *App, parent_: ?*CoreSurface, hidden: bool) !void {
|
|||||||
// freed when the window is closed.
|
// freed when the window is closed.
|
||||||
var window = try Window.create(alloc, self, hidden);
|
var window = try Window.create(alloc, self, hidden);
|
||||||
|
|
||||||
|
// The window should be destroyed if hidden == true
|
||||||
if (!hidden) {
|
if (!hidden) {
|
||||||
// Add our initial tab
|
// Add our initial tab
|
||||||
try window.newTab(parent_);
|
try window.newTab(parent_);
|
||||||
|
@ -361,6 +361,9 @@ pub fn init(self: *Window, app: *App, hidden: bool) !void {
|
|||||||
|
|
||||||
// Show the window
|
// Show the window
|
||||||
c.gtk_widget_show(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) {
|
if (hidden) {
|
||||||
c.gtk_widget_hide(window);
|
c.gtk_widget_hide(window);
|
||||||
c.gtk_window_destroy(gtk_window);
|
c.gtk_window_destroy(gtk_window);
|
||||||
|
Reference in New Issue
Block a user