summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-02 18:13:58 -0300
committerGabriel Schneider <[email protected]>2026-08-10 09:17:07 -0300
commit4f980de2c7a2ec29c561bca815c37879a18cc2b3 (patch)
tree904f0c295c4b7a29fae835c9a1500e35d885549e
parent4ffc8ed795ff58426aea28d3b3b38df1428d2980 (diff)
downloadpardes-4f980de2c7a2ec29c561bca815c37879a18cc2b3.tar.gz
pardes-4f980de2c7a2ec29c561bca815c37879a18cc2b3.zip
SDL backend does not grab mouse focus
-rw-r--r--next-steps.txt2
-rw-r--r--src/gui/gui.zig7
2 files changed, 5 insertions, 4 deletions
diff --git a/next-steps.txt b/next-steps.txt
index 63c355e9..0908b107 100644
--- a/next-steps.txt
+++ b/next-steps.txt
@@ -1,5 +1,5 @@
+ Esc in normal mode toggles focus (the same functionality as spc+w+t).
-- sdl backend no longer grabs mouse focus
++ sdl backend no longer grabs mouse focus
- implement a real basic config file at ~/.config/pardes (use zig stdlib to locate these config dirs) which will execute the builtins in each line; like Font abc, Theme asdfd, this will execute before rendering so that the application won't flash or anything when styling changes. also if there's an error with a command, it will silently fail.
- implement ipc comms via unix sockets, this will be used to deatach and reattach to a pardes session .
- Add the New builtin that will open a new empty tempfile on the column that called it.
diff --git a/src/gui/gui.zig b/src/gui/gui.zig
index ef2422c5..7d2a8cf1 100644
--- a/src/gui/gui.zig
+++ b/src/gui/gui.zig
@@ -1012,9 +1012,10 @@ fn runNative(init: std.process.Init, opts_in: pardes.Options) !void {
if (c.SDL_CreateCursor(&p9_arrow_set, &p9_arrow_mask, 16, 16, 1, 1)) |cur| {
_ = c.SDL_SetCursor(cur);
} else log.err("SDL_CreateCursor: {s}", .{c.SDL_GetError()});
- // fullscreen deck use: keep the pointer inside the window. Absolute
- // coords stay (no relative mode — clicks need positions).
- if (!test_mode) _ = c.SDL_SetWindowMouseGrab(window, true);
+ // Keep the window's mouse ungrabbed: desktop users must be able to move
+ // the pointer out normally. The deck's virtual pointer is clamped and
+ // warped explicitly only when its controls move it (see dispatch and
+ // pollGamepad), so it does not need window-wide confinement.
const device = c.SDL_CreateGPUDevice(c.SDL_GPU_SHADERFORMAT_SPIRV, true, null) orelse {
log.err("SDL_CreateGPUDevice: {s}", .{c.SDL_GetError()});
return error.SdlInit;