From 00c62708d328ef038913f1c91aa03d47f07310a3 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 22 Nov 2024 11:33:15 -0800 Subject: [PATCH] apprt: remove change conditional state action --- include/ghostty.h | 1 - src/apprt/action.zig | 8 -------- src/apprt/embedded.zig | 24 ------------------------ src/apprt/glfw.zig | 1 - src/apprt/gtk/App.zig | 1 - 5 files changed, 35 deletions(-) diff --git a/include/ghostty.h b/include/ghostty.h index f04ce1df4..681a4e9dc 100644 --- a/include/ghostty.h +++ b/include/ghostty.h @@ -577,7 +577,6 @@ typedef enum { GHOSTTY_ACTION_SECURE_INPUT, GHOSTTY_ACTION_KEY_SEQUENCE, GHOSTTY_ACTION_COLOR_CHANGE, - GHOSTTY_ACTION_CONFIG_CHANGE_CONDITIONAL_STATE, GHOSTTY_ACTION_RELOAD_CONFIG, GHOSTTY_ACTION_CONFIG_CHANGE, } ghostty_action_tag_e; diff --git a/src/apprt/action.zig b/src/apprt/action.zig index 94e998d25..527535ffa 100644 --- a/src/apprt/action.zig +++ b/src/apprt/action.zig @@ -194,13 +194,6 @@ pub const Action = union(Key) { /// such as OSC 10/11. color_change: ColorChange, - /// The state of conditionals in the configuration has changed, so - /// the configuration should be reloaded. The apprt doesn't need - /// to do a full physical reload; it should call the - /// `changeConditionalState` function and then `updateConfig` - /// on the app or surface. - config_change_conditional_state, - /// A request to reload the configuration. The reload request can be /// from a user or for some internal reason. The reload request may /// request it is a soft reload or a full reload. See the struct for @@ -259,7 +252,6 @@ pub const Action = union(Key) { secure_input, key_sequence, color_change, - config_change_conditional_state, reload_config, config_change, }; diff --git a/src/apprt/embedded.zig b/src/apprt/embedded.zig index 642d847f2..92137e6d7 100644 --- a/src/apprt/embedded.zig +++ b/src/apprt/embedded.zig @@ -450,30 +450,6 @@ pub const App = struct { }, }, - .config_change_conditional_state => switch (target) { - .app => {}, - .surface => |surface| action: { - // Build our new configuration. We can free the memory - // immediately after because the surface will derive any - // values it needs to. - var new_config = self.config.changeConditionalState( - surface.config_conditional_state, - ) catch |err| { - // Not a big deal if we error... we just don't update - // the config. We log the error and move on. - log.warn("error changing config conditional state err={}", .{err}); - break :action; - }; - defer new_config.deinit(); - - // Update our surface. - surface.updateConfig(&new_config) catch |err| { - log.warn("error updating surface config for state change err={}", .{err}); - break :action; - }; - }, - }, - else => {}, } } diff --git a/src/apprt/glfw.zig b/src/apprt/glfw.zig index 51d82ca7a..e793615d5 100644 --- a/src/apprt/glfw.zig +++ b/src/apprt/glfw.zig @@ -227,7 +227,6 @@ pub const App = struct { .renderer_health, .color_change, .pwd, - .config_change_conditional_state, .config_change, => log.info("unimplemented action={}", .{action}), } diff --git a/src/apprt/gtk/App.zig b/src/apprt/gtk/App.zig index e30996e8d..5d09a5782 100644 --- a/src/apprt/gtk/App.zig +++ b/src/apprt/gtk/App.zig @@ -490,7 +490,6 @@ pub fn performAction( .renderer_health, .color_change, .config_change, - .config_change_conditional_state, => log.warn("unimplemented action={}", .{action}), } }