summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2014-02-16 10:22:32 +0200
committerRan Benita <ran234@gmail.com>2014-02-16 11:05:17 +0200
commitaf261cb605a038170af0842b6b4c5b2eb1d0b03e (patch)
tree560d08cd055c4793adf4082c9985e449fcbfefc2 /src
parent8d3db622b804533214c8e78ac27a091552eb5227 (diff)
downloadlibxkbcommon-af261cb605a038170af0842b6b4c5b2eb1d0b03e.tar.gz
libxkbcommon-af261cb605a038170af0842b6b4c5b2eb1d0b03e.tar.bz2
libxkbcommon-af261cb605a038170af0842b6b4c5b2eb1d0b03e.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/x11/keymap.c2
-rw-r--r--src/xkbcomp/action.c5
-rw-r--r--src/xkbcomp/keymap-dump.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/x11/keymap.c b/src/x11/keymap.c
index 57f2412..49ff132 100644
--- a/src/x11/keymap.c
+++ b/src/x11/keymap.c
@@ -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;
diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c
index 0aad747..ad7f43f 100644
--- a/src/xkbcomp/action.c
+++ b/src/xkbcomp/action.c
@@ -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;
}
diff --git a/src/xkbcomp/keymap-dump.c b/src/xkbcomp/keymap-dump.c
index 0163bef..9e25ede 100644
--- a/src/xkbcomp/keymap-dump.c
+++ b/src/xkbcomp/keymap-dump.c
@@ -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;