action: fix SwitchScreen "same" field handling
This used to *unset* a flag called "SwitchApplication"; we changed the flag to "same" but forgot to switch the cases. Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
8d3db622b8
commit
af261cb605
|
@ -266,7 +266,7 @@ translate_action(union xkb_action *action, const xcb_xkb_action_t *wire)
|
|||
|
||||
action->screen.screen = wire->switchscreen.newScreen;
|
||||
|
||||
if (wire->switchscreen.flags & XCB_XKB_SWITCH_SCREEN_FLAG_APPLICATION)
|
||||
if (!(wire->switchscreen.flags & XCB_XKB_SWITCH_SCREEN_FLAG_APPLICATION))
|
||||
action->screen.flags |= ACTION_SAME_SCREEN;
|
||||
if (wire->switchscreen.flags & XCB_XKB_SWITCH_SCREEN_FLAG_ABSOLUTE)
|
||||
action->screen.flags |= ACTION_ABSOLUTE_SWITCH;
|
||||
|
|
|
@ -118,6 +118,7 @@ NewActionsInfo(void)
|
|||
/* Increment default button. */
|
||||
info->actions[ACTION_TYPE_PTR_DEFAULT].dflt.flags = 0;
|
||||
info->actions[ACTION_TYPE_PTR_DEFAULT].dflt.value = 1;
|
||||
info->actions[ACTION_TYPE_SWITCH_VT].screen.flags = ACTION_SAME_SCREEN;
|
||||
|
||||
return info;
|
||||
}
|
||||
|
@ -642,9 +643,9 @@ HandleSwitchScreen(struct xkb_keymap *keymap, union xkb_action *action,
|
|||
return ReportMismatch(keymap->ctx, action->type, field, "boolean");
|
||||
|
||||
if (set)
|
||||
act->flags &= ~ACTION_SAME_SCREEN;
|
||||
else
|
||||
act->flags |= ACTION_SAME_SCREEN;
|
||||
else
|
||||
act->flags &= ~ACTION_SAME_SCREEN;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -372,7 +372,7 @@ write_action(struct xkb_keymap *keymap, struct buf *buf,
|
|||
write_buf(buf, "%s%s(screen=%s%d,%ssame)%s", prefix, type,
|
||||
(!(action->screen.flags & ACTION_ABSOLUTE_SWITCH) && action->screen.screen >= 0) ? "+" : "",
|
||||
action->screen.screen,
|
||||
(action->screen.flags & ACTION_SAME_SCREEN) ? "!" : "",
|
||||
(action->screen.flags & ACTION_SAME_SCREEN) ? "" : "!",
|
||||
suffix);
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue