From 630c57ceb72954b22311a542330aedc557d004cd Mon Sep 17 00:00:00 2001 From: michalzxc Date: Fri, 6 Mar 2026 23:34:27 +0000 Subject: [PATCH] fix(linux/portal): set env_width/env_height so touch input works (#4822) --- src/platform/linux/portalgrab.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/platform/linux/portalgrab.cpp b/src/platform/linux/portalgrab.cpp index 6a1ef2c8..e4d78fae 100644 --- a/src/platform/linux/portalgrab.cpp +++ b/src/platform/linux/portalgrab.cpp @@ -1180,6 +1180,13 @@ namespace portal { height = negotiated_h; } + // Set env dimensions to match the captured display. + // Portal captures a single display, so the environment size equals the capture size. + // Without this, touch input is silently dropped because touch_port_t::operator bool() + // checks env_width and env_height are non-zero. + env_width = width; + env_height = height; + return 0; }