]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsamixer: Check the availability of mouse
authorTakashi Iwai <tiwai@suse.de>
Wed, 20 Oct 2021 13:39:13 +0000 (15:39 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 20 Oct 2021 15:24:30 +0000 (17:24 +0200)
Let's check the availiabiy via has_mouse().  Otherwise the program
aborts unexpectedly just focusing on my rxvt terminal :-(

Signed-off-by: Takashi Iwai <tiwai@suse.de>
alsamixer/mainloop.c

index e67c0f821e8a0c8ca55719be45c5da0dc1fbbcb4..cdbe28e390fd77cd1bb158512c21f3b9645a63b0 100644 (file)
@@ -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);
 }