diff --git a/src/App.zig b/src/App.zig index 4708d9c22..f933b7126 100644 --- a/src/App.zig +++ b/src/App.zig @@ -178,15 +178,6 @@ pub fn focusedSurface(self: *const App) ?*Surface { return surface; } -/// Is this the last focused surface. This is only valid while on the main -/// thread before tick is called. -pub fn isFocused(self: *const App, surface: *const Surface) bool { - if (!self.hasSurface(surface)) return false; - const focused = self.focused_surface orelse return false; - if (!self.hasSurface(focused)) return false; - return surface == focused; -} - /// Returns true if confirmation is needed to quit the app. It is up to /// the apprt to call this. pub fn needsConfirmQuit(self: *const App) bool { diff --git a/src/apprt/gtk/App.zig b/src/apprt/gtk/App.zig index bb9490f7a..244fee7f0 100644 --- a/src/apprt/gtk/App.zig +++ b/src/apprt/gtk/App.zig @@ -861,11 +861,17 @@ fn gtkActionPresentSurface( /// This is called to setup the action map that this application supports. /// This should be called only once on startup. fn initActions(self: *App) void { + // The set of actions. Each action has (in order): + // [0] The action name + // [1] The callback function + // [2] The GVariantType of the parameter + // + // For action names: + // https://docs.gtk.org/gio/type_func.Action.name_is_valid.html const actions = .{ .{ "quit", >kActionQuit, null }, .{ "open_config", >kActionOpenConfig, null }, .{ "reload_config", >kActionReloadConfig, null }, - // https://docs.gtk.org/gio/type_func.Action.name_is_valid.html .{ "present-surface", >kActionPresentSurface, c.G_VARIANT_TYPE("t") }, }; diff --git a/src/apprt/gtk/Surface.zig b/src/apprt/gtk/Surface.zig index f9f07d8bb..7d337fbe0 100644 --- a/src/apprt/gtk/Surface.zig +++ b/src/apprt/gtk/Surface.zig @@ -1146,12 +1146,10 @@ pub fn showDesktopNotification( const notification = c.g_notification_new(t.ptr); defer c.g_object_unref(notification); - c.g_notification_set_body(notification, body.ptr); const icon = c.g_themed_icon_new("com.mitchellh.ghostty"); defer c.g_object_unref(icon); - c.g_notification_set_icon(notification, icon); const pointer = c.g_variant_new_uint64(@intFromPtr(&self.core_surface));