Refactor duplicate branches of if() into a single block with leading ?:.
Refactor a bit of set_active_window_body() into a helper function.
Merge branch 'master' into window-select
Merge branch 'window-select'