Commit graph

11 commits

Author SHA1 Message Date
Jaroslav Kysela
10a2557d7e alsamixer: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:36:45 +02:00
Takashi Iwai
c511b49bf6 alsamixer: Revert has_mouse() check
has_mouse() function of ncurses doesn't seem working reliably.
Revert the previous change for addressing the regressions.

Fixes: 31820c5f23 ("alsamixer: Check the availability of mouse")
BugLink: https://github.com/alsa-project/alsa-utils/issues/139
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-01-28 17:46:45 +01:00
Takashi Iwai
31820c5f23 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 <tiwai@suse.de>
2021-10-20 17:24:30 +02:00
braph
89e746368c alsamixer: added configuration file parser
Added configparser.c and curskey.c:
  - Lines starting with arbitrary whitespace + '#' are comments
  - Words in a command name don't have a fixed order (toggle_mute is the
      same as mute_toggle)

Moved read_file() from textbox.c to utils.c, so configparser.c can make
use of it.

Added command line options:
  -f/-F to specify/disable configuration file
  -m/-M to enable/disable mouse

Signed-off-by: Benjamin Abendroth <braph93@gmx.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-07-01 16:10:35 +02:00
braph
ba1c5357a1 alsamixer: added mouse support
Mouse support has been added for mixer_widget.c, card_select.c and
proc_files.c.

In the mixer widget the mouse is handled as follows:
- After an element has been printed in mixer_display.c, a call to
  clickable_set() will store the coordinates of the drawn area plus the
  command enum that should be executed on click. An optional argument
  holds an index which points to the selected mixer control.
- on_mouse_click() searches for a matching rectangle, focuses the mixer
  control and returns the command enum.

In the menu widgets, the menu_driver() function handles mouse input.

Signed-off-by: Benjamin Abendroth <braph93@gmx.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-07-01 16:10:35 +02:00
Jaroslav Kysela
6e90e4fe8e alsamixer: fix gcc warnings
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-10-14 17:05:22 +02:00
Jaroslav Kysela
c788ce9b60 alsamixer: include missing mixer_controls.h 2014-06-25 10:54:40 +02:00
Clemens Ladisch
f282607273 alsamixer: fix handling of removed controls
When we get a notification that an element has been removed, we have to
recreate our internal control representation to avoid accessing freed
memory.  (And the checking for SND_CTL_EVENT_MASK_REMOVE should actually
be done correctly while we're at it.)

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2012-10-19 12:16:33 +02:00
Jaroslav Kysela
4c09aaa5c1 alsamixer: Fix X-win related crash for PulseAudio plugin (bad linking)
A lot of reports that alsamixer crashes in X terminal when the PulseAudio
CTL plugin is activated were entered to the tracking systems.

I figured that there is a linking clash for the shutdown() function.
The shutdown() function in glibc is socket related, but the alsamixer code
redefines this function and appearently that under some linking
circumstances - which PA client invokes during the runtime dynamic linking
- the wrong function is called.

This patch, for safety, renames the shutdown() function from alsamixer
to app_shutdown(), but it might make sense to figure the real linking
culprit to avoid future surprises.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-11-02 17:27:47 +01:00
Jaroslav Kysela
defee56c41 alsamixer: Improve set_escdelay() function availability detection
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-08-31 17:13:36 +02:00
Clemens Ladisch
5b6b5fd14b alsamixer: show channel names for multichannel controls
For multichannel mixer controls, add the channel name to each screen
control.

Also make some other small changes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-05-25 10:26:22 +02:00