The get_actual_window() function is doing its own lookup of the WM_NAME, and was still using the older window attribute. Not a showstopper problem, but would definitely result in an incorrect WM_NAME whenever the queried window had a (COMPOUND_TEXT) encoded WM_NAME. Generally this is due to a non-ASCII character being in the WM_NAME, and this is the case with the JetBrain Java apps that the get_actual_window() function was designed to deal with.
Propagating the same fix from the get_xorg_context() function that gets the UTF-8 encoded _NET_WM_NAME instead of WM_NAME.
Also the redundant "return window" line at the very end was never being accessed (orphaned line), and should probably be removed.
The get_actual_window() function is doing its own lookup of the WM_NAME, and was still using the older window attribute. Not a showstopper problem, but would definitely result in an incorrect WM_NAME whenever the queried window had a (COMPOUND_TEXT) encoded WM_NAME. Generally this is due to a non-ASCII character being in the WM_NAME, and this is the case with the JetBrain Java apps that the get_actual_window() function was designed to deal with.
Propagating the same fix from the get_xorg_context() function that gets the UTF-8 encoded _NET_WM_NAME instead of WM_NAME.
Also the redundant "return window" line at the very end was never being accessed (orphaned line), and should probably be removed.
Changes
Checklist