From c2ed2e7bc8b1f31b28aa1de67e93ca0e7cbe40f6 Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Sun, 31 Mar 2024 15:30:26 -0400 Subject: terminal: add terminal_set_mouse_input function This function is used to enable/disable mouse input for win32 and unix. --- video/out/vo_kitty.c | 4 ++-- video/out/vo_sixel.c | 4 ++-- video/out/vo_tct.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'video/out') diff --git a/video/out/vo_kitty.c b/video/out/vo_kitty.c index 21ca1a9edf..a5f716a0bd 100644 --- a/video/out/vo_kitty.c +++ b/video/out/vo_kitty.c @@ -362,7 +362,7 @@ static int preinit(struct vo *vo) #endif write_str(TERM_ESC_HIDE_CURSOR); - write_str(TERM_ESC_ENABLE_MOUSE); + terminal_set_mouse_input(true); if (p->opts.alt_screen) write_str(TERM_ESC_ALT_SCREEN); @@ -390,7 +390,7 @@ static void uninit(struct vo *vo) #endif write_str(TERM_ESC_RESTORE_CURSOR); - write_str(TERM_ESC_DISABLE_MOUSE); + terminal_set_mouse_input(false); if (p->opts.alt_screen) { write_str(TERM_ESC_NORMAL_SCREEN); diff --git a/video/out/vo_sixel.c b/video/out/vo_sixel.c index d0d85f60c0..c7df67f17f 100644 --- a/video/out/vo_sixel.c +++ b/video/out/vo_sixel.c @@ -520,7 +520,7 @@ static int preinit(struct vo *vo) sixel_strwrite(TERM_ESC_ALT_SCREEN); sixel_strwrite(TERM_ESC_HIDE_CURSOR); - sixel_strwrite(TERM_ESC_ENABLE_MOUSE); + terminal_set_mouse_input(true); /* don't use private color registers for each frame. */ sixel_strwrite(TERM_ESC_USE_GLOBAL_COLOR_REG); @@ -560,7 +560,7 @@ static void uninit(struct vo *vo) struct priv *priv = vo->priv; sixel_strwrite(TERM_ESC_RESTORE_CURSOR); - sixel_strwrite(TERM_ESC_DISABLE_MOUSE); + terminal_set_mouse_input(false); if (priv->opts.alt_screen) sixel_strwrite(TERM_ESC_NORMAL_SCREEN); diff --git a/video/out/vo_tct.c b/video/out/vo_tct.c index d794a68cc1..293f884544 100644 --- a/video/out/vo_tct.c +++ b/video/out/vo_tct.c @@ -299,7 +299,7 @@ static void flip_page(struct vo *vo) static void uninit(struct vo *vo) { WRITE_STR(TERM_ESC_RESTORE_CURSOR); - WRITE_STR(TERM_ESC_DISABLE_MOUSE); + terminal_set_mouse_input(false); WRITE_STR(TERM_ESC_NORMAL_SCREEN); struct priv *p = vo->priv; talloc_free(p->frame); @@ -329,7 +329,7 @@ static int preinit(struct vo *vo) } WRITE_STR(TERM_ESC_HIDE_CURSOR); - WRITE_STR(TERM_ESC_ENABLE_MOUSE); + terminal_set_mouse_input(true); WRITE_STR(TERM_ESC_ALT_SCREEN); return 0; -- cgit v1.2.3