From 472ea95314067cd7278f7b609bab861eede4c292 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 29 Oct 2026 09:00:47 -0400 Subject: [PATCH] Do not enable mouse tracking in read-only screenshot mode When resizing, need to only capture mouse if we are actually set to handle them. --- confluent_client/bin/nodeconsole | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/confluent_client/bin/nodeconsole b/confluent_client/bin/nodeconsole index 078bb731..c993ab7e 100755 --- a/confluent_client/bin/nodeconsole +++ b/confluent_client/bin/nodeconsole @@ -1,4 +1,4 @@ -#!/usr/libexec/platform-python +#!/usr/bin/python3 # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2015 Lenovo @@ -1033,9 +1033,10 @@ def do_resize(nodelist, winch=False): # on a window resize, clear the old stuff current_cursor = (1, 1) sys.stdout.write('\x1bc') - sys.stdout.write('\x1b[?1000h') # Enable mouse click tracking - sys.stdout.write('\x1b[?1003h') # Enable mouse movement tracking - sys.stdout.write('\x1b[?1006h') # Enable SGR extended mode for mouse + if console_direct_mode: + sys.stdout.write('\x1b[?1000h') # Enable mouse click tracking + sys.stdout.write('\x1b[?1003h') # Enable mouse movement tracking + sys.stdout.write('\x1b[?1006h') # Enable SGR extended mode for mouse global numrows global cwidth global cheight