mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
chore: add missing case in switch statement
This commit is contained in:

committed by
Mitchell Hashimoto

parent
9a58de6d5a
commit
7195bda7a2
@ -180,7 +180,7 @@ pub const App = struct {
|
||||
|
||||
.initial_position => switch (target) {
|
||||
.app => {},
|
||||
.surface => |surface| surface.rt_surface.setInitialWindowPosition(
|
||||
.surface => |surface| try surface.rt_surface.setInitialWindowPosition(
|
||||
value.x,
|
||||
value.y,
|
||||
),
|
||||
@ -674,7 +674,7 @@ pub const Surface = struct {
|
||||
/// Set the initial window position. This is called exactly once at
|
||||
/// surface initialization time. This may be called before "self"
|
||||
/// is fully initialized.
|
||||
fn setInitialWindowPosition(self: *const Surface, x: i32, y: i32) void {
|
||||
fn setInitialWindowPosition(self: *const Surface, x: i32, y: i32) !void {
|
||||
log.debug("setting initial window position ({},{})", .{ x, y });
|
||||
|
||||
self.window.setPos(.{ .x = x, .y = y });
|
||||
|
@ -474,6 +474,7 @@ pub fn performAction(
|
||||
.pwd => try self.setPwd(target, value),
|
||||
.present_terminal => self.presentTerminal(target),
|
||||
.initial_size => try self.setInitialSize(target, value),
|
||||
.initial_position => self.setInitialPosition(target, value),
|
||||
.mouse_visibility => self.setMouseVisibility(target, value),
|
||||
.mouse_shape => try self.setMouseShape(target, value),
|
||||
.mouse_over_link => self.setMouseOverLink(target, value),
|
||||
@ -794,7 +795,7 @@ fn setInitialPosition(
|
||||
) void {
|
||||
switch (target) {
|
||||
.app => {},
|
||||
.surface => |v| v.rt_surface.setInitialWindowPosition(
|
||||
.surface => |v| try v.rt_surface.setInitialWindowPosition(
|
||||
value.x,
|
||||
value.y,
|
||||
),
|
||||
|
Reference in New Issue
Block a user