summaryrefslogtreecommitdiff
path: root/src/monmon.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/monmon.cc')
-rw-r--r--src/monmon.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/monmon.cc b/src/monmon.cc
index 4335acb..ef341df 100644
--- a/src/monmon.cc
+++ b/src/monmon.cc
@@ -104,11 +104,12 @@ void MonMon::init(x::shared_connection const& conn, xcb_screen_t const* screen,
}
}
auto wm = ewmh->conn();
+ auto title_str = title();
if (wm) {
- xcb_ewmh_set_wm_name(wm, wnd_.get(), 6, "MonMon");
+ xcb_ewmh_set_wm_name(wm, wnd_.get(), title_str.size(), title_str.data());
} else {
xcb_icccm_set_wm_name(wnd_.conn(), wnd_.get(), XCB_ATOM_STRING, 8,
- 6, "MonMon");
+ title_str.size(), title_str.data());
}
xcb_create_gc(gcontext_.conn(), gcontext_.get(), wnd_.get(), 0, nullptr);
auto atom = atoms->get("WM_DELETE_WINDOW");