mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00
core: remove Surface.shouldClose
This was a noop in all of our apprts and I think is a holdover from the glfw days.
This commit is contained in:
12
src/App.zig
12
src/App.zig
@ -132,18 +132,6 @@ pub fn destroy(self: *App) void {
|
|||||||
/// events. This should be called by the application runtime on every loop
|
/// events. This should be called by the application runtime on every loop
|
||||||
/// tick.
|
/// tick.
|
||||||
pub fn tick(self: *App, rt_app: *apprt.App) !void {
|
pub fn tick(self: *App, rt_app: *apprt.App) !void {
|
||||||
// If any surfaces are closing, destroy them
|
|
||||||
var i: usize = 0;
|
|
||||||
while (i < self.surfaces.items.len) {
|
|
||||||
const surface = self.surfaces.items[i];
|
|
||||||
if (surface.shouldClose()) {
|
|
||||||
surface.close(false);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
i += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Drain our mailbox
|
// Drain our mailbox
|
||||||
try self.drainMailbox(rt_app);
|
try self.drainMailbox(rt_app);
|
||||||
}
|
}
|
||||||
|
@ -705,15 +705,6 @@ pub const Surface = struct {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn setShouldClose(self: *Surface) void {
|
|
||||||
_ = self;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn shouldClose(self: *const Surface) bool {
|
|
||||||
_ = self;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn getCursorPos(self: *const Surface) !apprt.CursorPos {
|
pub fn getCursorPos(self: *const Surface) !apprt.CursorPos {
|
||||||
return self.cursor_pos;
|
return self.cursor_pos;
|
||||||
}
|
}
|
||||||
|
@ -30,11 +30,6 @@ pub fn close(self: *Self, process_active: bool) void {
|
|||||||
_ = process_active;
|
_ = process_active;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn shouldClose(self: *Self) bool {
|
|
||||||
_ = self;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn getTitle(self: *Self) ?[:0]const u8 {
|
pub fn getTitle(self: *Self) ?[:0]const u8 {
|
||||||
_ = self;
|
_ = self;
|
||||||
return null;
|
return null;
|
||||||
|
@ -877,15 +877,6 @@ pub fn controlInspector(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn setShouldClose(self: *Surface) void {
|
|
||||||
_ = self;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn shouldClose(self: *const Surface) bool {
|
|
||||||
_ = self;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn getContentScale(self: *const Surface) !apprt.ContentScale {
|
pub fn getContentScale(self: *const Surface) !apprt.ContentScale {
|
||||||
const gtk_scale: f32 = scale: {
|
const gtk_scale: f32 = scale: {
|
||||||
const widget = self.gl_area.as(gtk.Widget);
|
const widget = self.gl_area.as(gtk.Widget);
|
||||||
|
Reference in New Issue
Block a user