patched to add res_class for WM to recognize its window class