summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-04 20:00:04 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-04 20:00:04 +1000
commit7797490e9e285589f501e46202df36b6bf8afcfd (patch)
tree9e581c403ef8b99df78bddb7e54be856ada4514e /include
parentMerge pull request #2561 from RyanDwyer/window-role-criteria (diff)
downloadsway-7797490e9e285589f501e46202df36b6bf8afcfd.tar.gz
sway-7797490e9e285589f501e46202df36b6bf8afcfd.tar.zst
sway-7797490e9e285589f501e46202df36b6bf8afcfd.zip
Deny repeating reload by holding key
Fixes #2568 The binding that gets stored in the keyboard's `repeat_binding` would get freed on reload, leaving a dangling pointer. Rather than attempt to unset the keyboard's `repeat_binding` along with the other bindings, I opted to just not set it for the reload command because there's no point in reloading repeatedly by holding the binding. This disables repeat bindings for the reload command. As we now need to detect whether it's a reload command in two places, I've added a binding flag to track whether it's a reload or not.
Diffstat (limited to 'include')
-rw-r--r--include/sway/config.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 4ee8c3c2..6024f0f6 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -31,10 +31,11 @@ enum binding_input_type {
31 31
32enum binding_flags { 32enum binding_flags {
33 BINDING_RELEASE=1, 33 BINDING_RELEASE=1,
34 BINDING_LOCKED=2, // keyboard only 34 BINDING_LOCKED=2, // keyboard only
35 BINDING_BORDER=4, // mouse only; trigger on container border 35 BINDING_BORDER=4, // mouse only; trigger on container border
36 BINDING_CONTENTS=8, // mouse only; trigger on container contents 36 BINDING_CONTENTS=8, // mouse only; trigger on container contents
37 BINDING_TITLEBAR=16 // mouse only; trigger on container titlebar 37 BINDING_TITLEBAR=16, // mouse only; trigger on container titlebar
38 BINDING_RELOAD=32, // the binding runs the reload command
38}; 39};
39 40
40/** 41/**