diff options
| author | Joel Klinghed <the_jk@opera.com> | 2017-10-02 12:59:10 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@opera.com> | 2017-10-02 12:59:10 +0200 |
| commit | 2e5352a1128da3ff4637561788a7da8e6b24ab9c (patch) | |
| tree | 3907b1f0983fa098eed7a2da14a3e77cbb6a9d40 /src | |
| parent | 545fb646ae68b9233c4fe3b5602d413caab02923 (diff) | |
Set a window name, NETWM if available fallback to ICCCM
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc index 849b75c..f259417 100644 --- a/src/main.cc +++ b/src/main.cc @@ -162,6 +162,12 @@ public: << std::endl; } } + auto wm = ewmh->conn(); + if (wm) { + xcb_ewmh_set_wm_name(wm, wnd_.get(), 6, "MonMon"); + } else { + xcb_icccm_set_wm_name(wnd_.conn(), wnd_.get(), XCB_ATOM_STRING, 8, 6, "MonMon"); + } xcb_create_gc(gcontext_.conn(), gcontext_.get(), wnd_.get(), 0, nullptr); auto atom = atoms->get("WM_DELETE_WINDOW"); xcb_icccm_set_wm_protocols(wnd_.conn(), wnd_.get(), |
