From 217dbf1ce592ba7fb33965d6ac81b10ca52ccd6f Mon Sep 17 00:00:00 2001 From: dcat Date: Mon, 9 Feb 2015 21:40:39 +0100 Subject: [PATCH] set window title --- bar.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bar.c b/bar.c index 6c24da0..ed272ce 100644 --- a/bar.c +++ b/bar.c @@ -65,6 +65,8 @@ enum { }; #define MAX_FONT_COUNT 5 +#define WIN_TITLE "bar" +#define WIN_TITLE_MAXLEN 128 /* should be enough for sane usage */ static xcb_connection_t *c; static xcb_screen_t *scr; @@ -591,6 +593,7 @@ set_ewmh_atoms (void) xcb_change_property(c, XCB_PROP_MODE_REPLACE, mon->window, atom_list[NET_WM_DESKTOP], XCB_ATOM_CARDINAL, 32, 1, (const uint32_t []){ -1 } ); xcb_change_property(c, XCB_PROP_MODE_REPLACE, mon->window, atom_list[NET_WM_STRUT_PARTIAL], XCB_ATOM_CARDINAL, 32, 12, strut); xcb_change_property(c, XCB_PROP_MODE_REPLACE, mon->window, atom_list[NET_WM_STRUT], XCB_ATOM_CARDINAL, 32, 4, strut); + xcb_change_property(c, XCB_PROP_MODE_REPLACE, mon->window, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8, strnlen(WIN_TITLE, WIN_TITLE_MAXLEN), WIN_TITLE); } }