mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 07:56:31 +01:00
define -> enum
This commit is contained in:
parent
5534edca6e
commit
4e33a9b23c
1 changed files with 1 additions and 3 deletions
|
@ -55,17 +55,16 @@ void handle_view_geometry_request(wlc_handle view, const struct wlc_geometry* ge
|
||||||
// deny that shit
|
// deny that shit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum { QSIZE = 32 };
|
||||||
|
|
||||||
bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers
|
bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers
|
||||||
*modifiers, uint32_t key, uint32_t sym, enum wlc_key_state state) {
|
*modifiers, uint32_t key, uint32_t sym, enum wlc_key_state state) {
|
||||||
#define QSIZE 32
|
|
||||||
static uint8_t head = 0;
|
static uint8_t head = 0;
|
||||||
static uint32_t array[QSIZE];
|
static uint32_t array[QSIZE];
|
||||||
|
|
||||||
struct sway_mode *mode = config->current_mode;
|
struct sway_mode *mode = config->current_mode;
|
||||||
// Lowercase if necessary
|
// Lowercase if necessary
|
||||||
sym = tolower(sym);
|
sym = tolower(sym);
|
||||||
|
|
||||||
//Add or remove key to array
|
//Add or remove key to array
|
||||||
if (state == WLC_KEY_STATE_PRESSED && head + 1 < QSIZE) {
|
if (state == WLC_KEY_STATE_PRESSED && head + 1 < QSIZE) {
|
||||||
array[head++] = sym;
|
array[head++] = sym;
|
||||||
|
@ -120,7 +119,6 @@ bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
#undef Q_SIZE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool pointer_test(swayc_t *view, void *_origin) {
|
bool pointer_test(swayc_t *view, void *_origin) {
|
||||||
|
|
Loading…
Reference in a new issue