diff options
author | 2015-08-20 07:38:40 -0400 | |
---|---|---|
committer | 2015-08-20 07:38:40 -0400 | |
commit | 85ae987515a9227bde15c736a941d5ee59e49dc3 (patch) | |
tree | 61cc489da5be4fcc97599019d135d1af3923e056 /sway | |
parent | Merge pull request #94 from taiyu-len/master (diff) | |
download | sway-85ae987515a9227bde15c736a941d5ee59e49dc3.tar.gz sway-85ae987515a9227bde15c736a941d5ee59e49dc3.tar.zst sway-85ae987515a9227bde15c736a941d5ee59e49dc3.zip |
Fix compiler warning
Diffstat (limited to 'sway')
-rw-r--r-- | sway/handlers.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 03a32835..6c103b02 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -286,13 +286,6 @@ static void handle_view_state_request(wlc_handle view, enum wlc_view_state_bit s | |||
286 | static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers, | 286 | static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers, |
287 | uint32_t key, uint32_t sym, enum wlc_key_state state) { | 287 | uint32_t key, uint32_t sym, enum wlc_key_state state) { |
288 | 288 | ||
289 | static const uint32_t modifier_syms[] = { | ||
290 | XKB_KEY_Shift_L, XKB_KEY_Shift_R, XKB_KEY_Control_L, XKB_KEY_Control_R, | ||
291 | XKB_KEY_Caps_Lock, XKB_KEY_Shift_Lock, XKB_KEY_Meta_L, XKB_KEY_Meta_R, | ||
292 | XKB_KEY_Alt_L, XKB_KEY_Alt_R, XKB_KEY_Super_L, XKB_KEY_Super_R, | ||
293 | XKB_KEY_Hyper_L, XKB_KEY_Hyper_R | ||
294 | }; | ||
295 | |||
296 | if (locked_view_focus && state == WLC_KEY_STATE_PRESSED) { | 289 | if (locked_view_focus && state == WLC_KEY_STATE_PRESSED) { |
297 | return false; | 290 | return false; |
298 | } | 291 | } |
@@ -316,14 +309,6 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier | |||
316 | sym = tolower(sym); | 309 | sym = tolower(sym); |
317 | 310 | ||
318 | int i; | 311 | int i; |
319 | bool mod = false; | ||
320 | |||
321 | for (i = 0; i < sizeof(modifier_syms) / sizeof(uint32_t); ++i) { | ||
322 | if (modifier_syms[i] == sym) { | ||
323 | mod = true; | ||
324 | break; | ||
325 | } | ||
326 | } | ||
327 | 312 | ||
328 | if (state == WLC_KEY_STATE_PRESSED) { | 313 | if (state == WLC_KEY_STATE_PRESSED) { |
329 | press_key(sym); | 314 | press_key(sym); |