joshgoebel / keyszer

a smart, flexible keymapper for X11 (a fork/reboot of xkeysnail )
Other
69 stars 15 forks source link

Add (COMPOUND_TEXT) fix to get_actual_window() #133

Closed RedBearAK closed 1 year ago

RedBearAK commented 1 year ago

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