[PATCH alsa-utils 1/2] alsamixer: Check the availability of mouse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 alsamixer/mainloop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/alsamixer/mainloop.c b/alsamixer/mainloop.c
index e67c0f821e8a..cdbe28e390fd 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);
 }
-- 
2.26.2




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux