From acdfb2801e224c04c438da0a85dd9900b10256fc Mon Sep 17 00:00:00 2001 From: Hermenix Date: Sat, 3 Oct 2026 19:42:13 +0000 Subject: [PATCH] the default capture command now asks for the cursor grim's `-c` ("include cursors in the screenshot") exists because the screencopy protocol takes the decision from the client: Hyprland's capture_output carries an overlayCursor argument and the frame is only composited with the cursor when it is set. Without it a frame shows that *something* changed and never where it was clicked -- and a click on the wrong element looks exactly like a click on the right one, which is the whole reason the pointer work is verifiable at all. Found by reading Hyprland's Screencopy.cpp rather than guessing at a compositor setting: `no_hardware_cursors` was already on, and the cursor was invisible because nobody had asked for it. --- src/hhstream/server.py | 2 +- tests/unit/test_cli.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hhstream/server.py b/src/hhstream/server.py index 343ec4b..c354301 100644 --- a/src/hhstream/server.py +++ b/src/hhstream/server.py @@ -27,7 +27,7 @@ DEFAULT_SOCKET = "/run/hypr-stream/stream.sock" #: Contract: the published socket is mode 0660 (ownership is the unit's job). SOCKET_MODE = 0o660 #: Contract default for `services.hyprland-headless-stream.captureCommand`. -DEFAULT_CAPTURE_COMMAND = ["grim", "-t", "png", "-"] +DEFAULT_CAPTURE_COMMAND = ["grim", "-c", "-t", "png", "-"] _BACKLOG = 64 _WAIT_TICK = 0.2 # how often a blocked client thread re-checks for shutdown diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py index 494b5e0..f1fe913 100644 --- a/tests/unit/test_cli.py +++ b/tests/unit/test_cli.py @@ -56,7 +56,7 @@ def test_server_defaults_match_the_contract(): args = server.build_parser().parse_args([]) assert args.socket == "/run/hypr-stream/stream.sock" assert (args.fps, args.format, args.capture_command) == (30, "png", None) - assert server.DEFAULT_CAPTURE_COMMAND == ["grim", "-t", "png", "-"] + assert server.DEFAULT_CAPTURE_COMMAND == ["grim", "-c", "-t", "png", "-"] def test_capture_command_is_one_argv_token_per_flag():