- 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_hidden)
- action = self->iconic ?
- 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.net_wm_state_demands_attention)
- action = self->demands_attention ?
- 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;
+ if (action == OBT_PROP_ATOM(NET_WM_STATE_TOGGLE)) {
+ if (state == OBT_PROP_ATOM(NET_WM_STATE_MODAL))
+ value = modal;
+ else if (state == OBT_PROP_ATOM(NET_WM_STATE_MAXIMIZED_VERT))
+ value = self->max_vert;
+ else if (state == OBT_PROP_ATOM(NET_WM_STATE_MAXIMIZED_HORZ))
+ value = self->max_horz;
+ else if (state == OBT_PROP_ATOM(NET_WM_STATE_SHADED))
+ value = shaded;
+ else if (state == OBT_PROP_ATOM(NET_WM_STATE_SKIP_TASKBAR))
+ value = self->skip_taskbar;
+ else if (state == OBT_PROP_ATOM(NET_WM_STATE_SKIP_PAGER))
+ value = self->skip_pager;
+ else if (state == OBT_PROP_ATOM(NET_WM_STATE_HIDDEN))
+ value = self->iconic;
+ else if (state == OBT_PROP_ATOM(NET_WM_STATE_FULLSCREEN))
+ value = fullscreen;
+ else if (state == OBT_PROP_ATOM(NET_WM_STATE_ABOVE))
+ value = self->above;
+ else if (state == OBT_PROP_ATOM(NET_WM_STATE_BELOW))
+ value = self->below;
+ else if (state == OBT_PROP_ATOM(NET_WM_STATE_DEMANDS_ATTENTION))
+ value = self->demands_attention;
+ else if (state == OBT_PROP_ATOM(OB_WM_STATE_UNDECORATED))
+ value = undecorated;
+ else
+ g_assert_not_reached();
+ action = value ? OBT_PROP_ATOM(NET_WM_STATE_REMOVE) :
+ OBT_PROP_ATOM(NET_WM_STATE_ADD);