chore: add missing case in switch statement

This commit is contained in:
Adam Wolf
2024-12-29 13:08:34 -06:00
committed by Mitchell Hashimoto
parent 9a58de6d5a
commit 7195bda7a2
2 changed files with 4 additions and 3 deletions

View File

@ -180,7 +180,7 @@ pub const App = struct {
.initial_position => switch (target) { .initial_position => switch (target) {
.app => {}, .app => {},
.surface => |surface| surface.rt_surface.setInitialWindowPosition( .surface => |surface| try surface.rt_surface.setInitialWindowPosition(
value.x, value.x,
value.y, value.y,
), ),
@ -674,7 +674,7 @@ pub const Surface = struct {
/// Set the initial window position. This is called exactly once at /// Set the initial window position. This is called exactly once at
/// surface initialization time. This may be called before "self" /// surface initialization time. This may be called before "self"
/// is fully initialized. /// 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 }); log.debug("setting initial window position ({},{})", .{ x, y });
self.window.setPos(.{ .x = x, .y = y }); self.window.setPos(.{ .x = x, .y = y });

View File

@ -474,6 +474,7 @@ pub fn performAction(
.pwd => try self.setPwd(target, value), .pwd => try self.setPwd(target, value),
.present_terminal => self.presentTerminal(target), .present_terminal => self.presentTerminal(target),
.initial_size => try self.setInitialSize(target, value), .initial_size => try self.setInitialSize(target, value),
.initial_position => self.setInitialPosition(target, value),
.mouse_visibility => self.setMouseVisibility(target, value), .mouse_visibility => self.setMouseVisibility(target, value),
.mouse_shape => try self.setMouseShape(target, value), .mouse_shape => try self.setMouseShape(target, value),
.mouse_over_link => self.setMouseOverLink(target, value), .mouse_over_link => self.setMouseOverLink(target, value),
@ -794,7 +795,7 @@ fn setInitialPosition(
) void { ) void {
switch (target) { switch (target) {
.app => {}, .app => {},
.surface => |v| v.rt_surface.setInitialWindowPosition( .surface => |v| try v.rt_surface.setInitialWindowPosition(
value.x, value.x,
value.y, value.y,
), ),