properly set WM_* attributes