Creates a WindowInfo object from the window title and WM_CLASS.
        Also checks for the Java XFocusProxyWindow workaround and applies it if needed:

        Workaround for Java applications: Java AWT uses a XFocusProxyWindow class, so to get usable information,
        the parent window needs to be queried. Credits: https://github.com/mooz/xkeysnail/pull/32
        https://github.com/JetBrains/jdk8u_jdk/blob/master/src/solaris/classes/sun/awt/X11/XFocusProxyWindow.java#L35

def _create_window_info(self, window, wm_title: str, wm_class: str):
        """
        Creates a WindowInfo object from the window title and WM_CLASS.
        Also checks for the Java XFocusProxyWindow workaround and applies it if needed:

        Workaround for Java applications: Java AWT uses a XFocusProxyWindow class, so to get usable information,
        the parent window needs to be queried. Credits: https://github.com/mooz/xkeysnail/pull/32
        https://github.com/JetBrains/jdk8u_jdk/blob/master/src/solaris/classes/sun/awt/X11/XFocusProxyWindow.java#L35
        """
        if "FocusProxy" in wm_class:
            parent = window.query_tree().parent
            # Discard both the already known wm_class and window title, because both are known to be wrong.
            return self._get_window_info(parent, False)
        else:
            return WindowInfo(wm_title=wm_title, wm_class=wm_class)