summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index cc55d695..6e01f8cd 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -3670,6 +3670,9 @@ pub const CellPixels = if (pdf_enabled) struct {
h: u16 = 16,
} else struct {};
+/// Said at a focus-in when the Host's `newer_build` answers yes (upgrade.zig).
+pub const newer_build_words = "a newer pardes is installed: Upgrade (SPC s U) moves this session onto it";
+
pub const Event = union(enum) {
key: Key,
mouse: Mouse,
@@ -6338,7 +6341,10 @@ pub const Pardes = struct {
.command => |line| _ = p.executeBuiltinLine(p.active, line),
.pinch => |scale| p.ov_pinch_scale = scale,
.touch_scroll => |delta| p.ov_touch_scroll_delta = delta,
- .focus => |focused| p.window_focused = focused,
+ .focus => |focused| {
+ p.window_focused = focused;
+ if (focused) if (p.host.vtable.newer_build) |f| if (f(p.host.ctx)) p.setMessage(p.active, newer_build_words);
+ },
.handed => |h| p.handover.finish(p, h.seq, h.to, h.failure),
.pointer_leave => {
p.pointer_inside = false;