summaryrefslogtreecommitdiff
path: root/src/Surface.zig
diff options
context:
space:
mode:
authorCJ van den Berg <cj@vdbonline.com>2024-10-28 09:48:01 +0100
committerCJ van den Berg <cj@vdbonline.com>2024-10-30 17:35:34 +0100
commita2a1d93d5cbc2c6e00193902b4d3ac09d161b330 (patch)
treec1208bdd05bf06ff7bc0df19f2d19a6f182b4cbe /src/Surface.zig
parentc413f2445d8fc9af8919bae818ec01b5a543cec2 (diff)
apprt: propagate OSC10/11 (set term fore/background color) through to apprt
This is to allow the running apprt to set the UI theme to match the terminal application coloring.
Diffstat (limited to 'src/Surface.zig')
-rw-r--r--src/Surface.zig16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Surface.zig b/src/Surface.zig
index 82d1240eb..b14ffe706 100644
--- a/src/Surface.zig
+++ b/src/Surface.zig
@@ -799,6 +799,22 @@ pub fn handleMessage(self: *Surface, msg: Message) !void {
}, .unlocked);
},
+ .set_background => |color| {
+ try self.rt_app.performAction(
+ .{ .surface = self },
+ .set_background,
+ .{ .r = color.r, .g = color.g, .b = color.b },
+ );
+ },
+
+ .set_foreground => |color| {
+ try self.rt_app.performAction(
+ .{ .surface = self },
+ .set_background,
+ .{ .r = color.r, .g = color.g, .b = color.b },
+ );
+ },
+
.set_mouse_shape => |shape| {
log.debug("changing mouse shape: {}", .{shape});
try self.rt_app.performAction(