- if (!state) continue;
-
- /* if toggling, then pick whether we're adding or removing */
- if (action == prop_atoms.net_wm_state_toggle) {
- if (state == prop_atoms.net_wm_state_modal)
- action = self->modal ? prop_atoms.net_wm_state_remove :
- prop_atoms.net_wm_state_add;
- else if (state == prop_atoms.net_wm_state_maximized_vert)
- action = self->max_vert ? prop_atoms.net_wm_state_remove :
- prop_atoms.net_wm_state_add;
- else if (state == prop_atoms.net_wm_state_maximized_horz)
- action = self->max_horz ? prop_atoms.net_wm_state_remove :
- prop_atoms.net_wm_state_add;
- else if (state == prop_atoms.net_wm_state_shaded)
- action = self->shaded ? prop_atoms.net_wm_state_remove :
- prop_atoms.net_wm_state_add;
- else if (state == prop_atoms.net_wm_state_skip_taskbar)
- action = self->skip_taskbar ?
- prop_atoms.net_wm_state_remove :
- prop_atoms.net_wm_state_add;
- else if (state == prop_atoms.net_wm_state_skip_pager)
- action = self->skip_pager ?
- prop_atoms.net_wm_state_remove :
- prop_atoms.net_wm_state_add;
- else if (state == prop_atoms.net_wm_state_fullscreen)
- action = self->fullscreen ?
- prop_atoms.net_wm_state_remove :
- prop_atoms.net_wm_state_add;
- else if (state == prop_atoms.net_wm_state_above)
- action = self->above ? prop_atoms.net_wm_state_remove :
- prop_atoms.net_wm_state_add;
- else if (state == prop_atoms.net_wm_state_below)
- action = self->below ? prop_atoms.net_wm_state_remove :
- prop_atoms.net_wm_state_add;
- }
+ if (!state) continue;
+
+ /* if toggling, then pick whether we're adding or removing */
+ if (action == prop_atoms.net_wm_state_toggle) {
+ if (state == prop_atoms.net_wm_state_modal)
+ action = modal ? prop_atoms.net_wm_state_remove :
+ prop_atoms.net_wm_state_add;
+ else if (state == prop_atoms.net_wm_state_maximized_vert)
+ action = self->max_vert ? prop_atoms.net_wm_state_remove :
+ prop_atoms.net_wm_state_add;
+ else if (state == prop_atoms.net_wm_state_maximized_horz)
+ action = self->max_horz ? prop_atoms.net_wm_state_remove :
+ prop_atoms.net_wm_state_add;
+ else if (state == prop_atoms.net_wm_state_shaded)
+ action = shaded ? prop_atoms.net_wm_state_remove :
+ prop_atoms.net_wm_state_add;
+ else if (state == prop_atoms.net_wm_state_skip_taskbar)
+ action = self->skip_taskbar ?
+ prop_atoms.net_wm_state_remove :
+ prop_atoms.net_wm_state_add;
+ else if (state == prop_atoms.net_wm_state_skip_pager)
+ action = self->skip_pager ?
+ prop_atoms.net_wm_state_remove :
+ prop_atoms.net_wm_state_add;
+ else if (state == prop_atoms.net_wm_state_fullscreen)
+ action = fullscreen ?
+ prop_atoms.net_wm_state_remove :
+ prop_atoms.net_wm_state_add;
+ else if (state == prop_atoms.net_wm_state_above)
+ action = self->above ? prop_atoms.net_wm_state_remove :
+ prop_atoms.net_wm_state_add;
+ else if (state == prop_atoms.net_wm_state_below)
+ action = self->below ? prop_atoms.net_wm_state_remove :
+ prop_atoms.net_wm_state_add;
+ else if (state == prop_atoms.ob_wm_state_undecorated)
+ action = undecorated ? prop_atoms.net_wm_state_remove :
+ prop_atoms.net_wm_state_add;
+ }