summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-12-18 16:50:00 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-12-18 16:50:00 +0100
commitb5a8c05063fe1d7b8611f46da8716c321cf34c07 (patch)
treefc23829df4999b9cbb167077e424e87d70849a25 /src
parentcc3b72eaf8fd1a88cb5b26f2604a966673033902 (diff)
downloadpa-sink-ctl-b5a8c05063fe1d7b8611f46da8716c321cf34c07.tar.gz
pa-sink-ctl-b5a8c05063fe1d7b8611f46da8716c321cf34c07.tar.bz2
pa-sink-ctl-b5a8c05063fe1d7b8611f46da8716c321cf34c07.zip
interface: getmaxx is not standard, use getmaxyx instead
Diffstat (limited to 'src')
-rw-r--r--src/interface.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/interface.c b/src/interface.c
index eda6535..fa0eee4 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -113,11 +113,12 @@ interface_resize(gpointer data)
static void
print_volume(struct context *ctx, struct vol_ctl *ctl)
{
- gint x, y, volume_bar_len, vol;
+ gint x, y, max_x, max_y, volume_bar_len, vol;
getyx(ctx->menu_win, y, x);
+ getmaxyx(ctx->menu_win, max_y, max_x);
/* mute button + brackets + space */
- volume_bar_len = getmaxx(ctx->menu_win) - x - 8;
+ volume_bar_len = max_x - x - 8;
vol = (gint) (volume_bar_len * ctl->vol / PA_VOLUME_NORM);
wprintw(ctx->menu_win, " [%c]", ctl->mute ? 'M' : ' ');