migrate detect_wm_theme