keymap-dump: don't print "affect=lock" in PtrLock It's the same as no flags, so might as well not print it. (In fact it is slightly harmful, because it actively *clears* the affect flags, which might have been set in some other manner. But in practice this cannot happen). Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
diff --git a/src/xkbcomp/keymap-dump.c b/src/xkbcomp/keymap-dump.c
index 942d541..c014446 100644
--- a/src/xkbcomp/keymap-dump.c
+++ b/src/xkbcomp/keymap-dump.c
@@ -335,18 +335,12 @@ write_action(struct xkb_keymap *keymap, struct buf *buf,
case ACTION_LOCK_NO_UNLOCK:
args = ",affect=lock";
break;
-
case ACTION_LOCK_NO_LOCK:
args = ",affect=unlock";
break;
-
case ACTION_LOCK_NO_LOCK | ACTION_LOCK_NO_UNLOCK:
args = ",affect=neither";
break;
-
- default:
- args = ",affect=both";
- break;
}
case ACTION_TYPE_PTR_BUTTON:
write_buf(buf, "%s%s(button=", prefix, type);
diff --git a/test/data/keymaps/stringcomp.data b/test/data/keymaps/stringcomp.data
index 8f80fcc..119fb99 100644
--- a/test/data/keymaps/stringcomp.data
+++ b/test/data/keymaps/stringcomp.data
@@ -880,16 +880,16 @@ xkb_compatibility "complete_caps(caps_lock)_4_misc(assign_shift_left_action)_4_l
action= PtrBtn(button=3,count=2);
};
interpret Pointer_Drag_Dflt+AnyOfOrNone(all) {
- action= LockPtrBtn(button=default,affect=both);
+ action= LockPtrBtn(button=default);
};
interpret Pointer_Drag1+AnyOfOrNone(all) {
- action= LockPtrBtn(button=1,affect=both);
+ action= LockPtrBtn(button=1);
};
interpret Pointer_Drag2+AnyOfOrNone(all) {
- action= LockPtrBtn(button=2,affect=both);
+ action= LockPtrBtn(button=2);
};
interpret Pointer_Drag3+AnyOfOrNone(all) {
- action= LockPtrBtn(button=3,affect=both);
+ action= LockPtrBtn(button=3);
};
interpret Pointer_EnableKeys+AnyOfOrNone(all) {
action= LockControls(controls=MouseKeys);