summaryrefslogtreecommitdiff
path: root/dev/gui
diff options
context:
space:
mode:
Diffstat (limited to 'dev/gui')
-rw-r--r--dev/gui/gui.zig11
1 files changed, 3 insertions, 8 deletions
diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig
index bc831a69..60cb3801 100644
--- a/dev/gui/gui.zig
+++ b/dev/gui/gui.zig
@@ -2827,14 +2827,9 @@ fn waitInput(ctx: ?*anyopaque, timeout_ms: u32) void {
/// Detached: no window, asleep until the queue's wake (an SDL user event:
/// a pty's output, the daemon's window request), the core's next wake, or a
-/// quit (SDL makes SIGTERM and SIGINT one). With nobody to dismiss them,
-/// messages go on the clock (the pump's, after this wait), which wakes it.
+/// quit (SDL makes SIGTERM and SIGINT one).
fn waitDetached(core: *pardes.Pardes, timeout_ms: u32) void {
- var ms: c_int = if (timeout_ms != 0) @intCast(@min(timeout_ms, std.math.maxInt(c_int))) else -1;
- for (core.panes) |slot| if (slot) |pane| if (pane.msg_len > 0) {
- ms = if (ms < 0) 100 else @min(ms, 100);
- break;
- };
+ const ms: c_int = if (timeout_ms != 0) @intCast(@min(timeout_ms, std.math.maxInt(c_int))) else -1;
var sev = std.mem.zeroes(c.SDL_Event);
pardes.turn.rest();
var got = c.SDL_WaitEventTimeout(&sev, ms);
@@ -6341,7 +6336,7 @@ test "background opacity acknowledges success and rolls back unsupported surface
try std.testing.expectEqual(applied, core.settings.window_opacity);
try std.testing.expect(!core.settings.window_opacity_pending);
const pane = core.panes[0].?;
- try std.testing.expectEqualStrings("WindowOpacity: background transparency requires an alpha-capable SDL window", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("WindowOpacity: background transparency requires an alpha-capable SDL window", core.messages.saidBy(pane));
try std.testing.expect(core.executeBuiltinLine(0, "WindowOpacity 40"));
try std.testing.expect(core.settings.window_opacity_pending);