From: Takashi Iwai Date: Wed, 20 Oct 2021 13:39:13 +0000 (+0200) Subject: alsamixer: Check the availability of mouse X-Git-Tag: v1.2.6~13 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=31820c5f239fca2de12c8d1a7327ccf995188f33;p=alsa-utils.git alsamixer: Check the availability of mouse Let's check the availiabiy via has_mouse(). Otherwise the program aborts unexpectedly just focusing on my rxvt terminal :-( Signed-off-by: Takashi Iwai --- diff --git a/alsamixer/mainloop.c b/alsamixer/mainloop.c index e67c0f8..cdbe28e 100644 --- a/alsamixer/mainloop.c +++ b/alsamixer/mainloop.c @@ -50,7 +50,7 @@ void initialize_curses(bool use_color, bool use_mouse) #endif window_size_changed(); /* update screen_lines/cols */ init_colors(use_color); - if (use_mouse) + if (use_mouse && has_mouse()) mousemask(ALL_MOUSE_EVENTS, NULL); snd_lib_error_set_handler(black_hole_error_handler); }