summaryrefslogtreecommitdiffhomepage
path: root/packages/kernel/include
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-13 16:05:28 +0900
committerAdam Malczewski <[email protected]>2026-06-13 16:05:28 +0900
commit9ee2d3ceee93ff0d0afdb47f594ea4fee95455fc (patch)
tree4a1b73d8f140c88775d0487434ba23e807fc441f /packages/kernel/include
parent11812b0374d5de395e2c17532c6bf89a903ee043 (diff)
downloadunbox-9ee2d3ceee93ff0d0afdb47f594ea4fee95455fc.tar.gz
unbox-9ee2d3ceee93ff0d0afdb47f594ea4fee95455fc.zip
Kernel: Ctrl+Alt+F1..F12 VT switching (session escape hatch)
Intercept the XF86Switch_VT_1..12 keysyms before the keybinding filter and call wlr_session_change_vt, so the user can always switch consoles while unbox runs. Clean no-op without a session (headless/nested). Pure vt_for_keysym helper + doctest; wlroots reached via the wlr.hpp wrapper. Real-seat verified on the CF-AX3.
Diffstat (limited to 'packages/kernel/include')
-rw-r--r--packages/kernel/include/unbox/kernel/wlr.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/kernel/include/unbox/kernel/wlr.hpp b/packages/kernel/include/unbox/kernel/wlr.hpp
index 496d737..c890774 100644
--- a/packages/kernel/include/unbox/kernel/wlr.hpp
+++ b/packages/kernel/include/unbox/kernel/wlr.hpp
@@ -27,6 +27,15 @@ extern "C" {
// protocol/wlr headers (only `namespace` collides in the current set).
#define namespace _namespace
#include <wlr/backend.h>
+// Session escape-hatch (kernel VT switching, Ctrl+Alt+Fn): wlr_session +
+// wlr_session_change_vt. In wlroots 0.20 the session is NOT fetched from the
+// backend (there is no wlr_backend_get_session); it is the out-param of
+// wlr_backend_autocreate, which the kernel captures at init. NULL under the
+// headless/nested backends (no libseat session) — the glue no-ops then.
+// Static-blanking re-audit: this header is plain declarations only (no
+// header-inline function with a function-local static, no `[static N]`
+// array-param), so the surrounding `#define static` is inert across it.
+#include <wlr/backend/session.h>
#include <wlr/render/allocator.h>
// Slice-3 spike (RMLUi -> wlr_scene bridge): EGL/dmabuf, the GLES2 renderer's
// EGL accessors, buffer (dmabuf + data-ptr access for the shm fallback),