From b5a8c05063fe1d7b8611f46da8716c321cf34c07 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sun, 18 Dec 2011 16:50:00 +0100 Subject: interface: getmaxx is not standard, use getmaxyx instead --- src/interface.c | 5 +++-- 1 file 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' : ' '); -- cgit