Skip to content

Commit 6191d17

Browse files
committed
Don't try moving cursor if no wl_virtual_pointer_mgr
1 parent 9501890 commit 6191d17

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/utils_wayland.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ static void _apply_transform(
6464
void move_pointer(
6565
struct state *state, uint32_t x, uint32_t y, enum click click
6666
) {
67+
if (!state->wl_virtual_pointer_mgr) {
68+
// We running in `--print-only` mode.
69+
return;
70+
}
71+
6772
wl_display_roundtrip(state->wl_display);
6873

6974
struct zwlr_virtual_pointer_v1 *virt_pointer =

0 commit comments

Comments
 (0)