From e330aaee46a00bba131b2c14bc1c3d471f12bf8c Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Tue, 9 Jul 2019 16:53:12 +0100 Subject: [PATCH] wmix: call `XSetCommand()`. Signed-off-by: Jeremy Sowden --- wmix/include/ui_x.h | 3 ++- wmix/ui_x.c | 4 +++- wmix/wmix.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/wmix/include/ui_x.h b/wmix/include/ui_x.h index 22f1f9b..992a48f 100644 --- a/wmix/include/ui_x.h +++ b/wmix/include/ui_x.h @@ -20,7 +20,8 @@ void dockapp_init (Display *x_display, Bool randr); -void new_window (char *name, int width, int height); +void new_window (char *name, int width, int height, + int argc, char **argv); void new_osd (int height); void update_osd (float volume, bool up); diff --git a/wmix/ui_x.c b/wmix/ui_x.c index 72d1349..ffc3add 100644 --- a/wmix/ui_x.c +++ b/wmix/ui_x.c @@ -235,7 +235,7 @@ void scroll_text(int x, int y, int width, bool reset) return; } -void new_window(char *name, int width, int height) +void new_window(char *name, int width, int height, int argc, char **argv) { XpmAttributes attr; Pixel fg, bg; @@ -332,6 +332,8 @@ void new_window(char *name, int width, int height) bar_cursor = XCreateFontCursor(display, XC_sb_up_arrow); null_cursor = create_null_cursor(display); + XSetCommand(display, win, argv, argc); + XMapWindow(display, win); } diff --git a/wmix/wmix.c b/wmix/wmix.c index a2020c3..a26cab8 100644 --- a/wmix/wmix.c +++ b/wmix/wmix.c @@ -106,7 +106,7 @@ int main(int argc, char **argv) display_height = (float)DisplayHeight(display, DefaultScreen(display)) / 2.0; dockapp_init(display, have_randr); - new_window("wmix", 64, 64); + new_window("wmix", 64, 64, argc, argv); new_osd(60); if (config.mmkeys)