Skip to content

Commit 6d62a7c

Browse files
author
Simon Hofmann
committed
(#17) Added doc comment regarding the use of instead of
1 parent ce2345c commit 6d62a7c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/linux/window_manager.cc

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ std::string getWindowTitle(const WindowHandle windowHandle) {
4040
Display* xServer = XGetMainDisplay();
4141
std::string windowName = "";
4242
if (xServer != NULL) {
43+
/*
44+
* While there's also `XFetchName` to retrieve a window's `WM_NAME` property, in my tests `XFetchName` always failed and return 0
45+
* `XGetWMName` on the other hand just worked as expected.
46+
* Keep that in mind in case you're considering changing this implementation
47+
*/
4348
XTextProperty windowTextProperty;
4449
Status getWMNameResult = XGetWMName(xServer, windowHandle, &windowTextProperty);
4550
if (getWMNameResult > 0) {

0 commit comments

Comments
 (0)