Closed yuliswe closed 5 years ago
I don't understand the lines
textlen = std::max(textlen - 1, static_cast<int>(sizeof(w.Name)) - 1);
textlen = std::min(textlen, 0);
w.Name[textlen] = '\n';
This second line is setting textlen
to 0
. I believe this is a bug.
Thanks for pointing this out I just pushed a change It should fix this.
What's the reason in
src/windows/GetWindows.cpp
, the functionEnumWindowsProc
puts a\n
at the beginning of the window title retrieved? When I use it to get window titles, every first char is somehow missing. For example, window title "Task Manager" is incorrectly set as "\nask Manager". The issue apparently can be solved by simply removing the linew.Name[textlen] = '\n';
.