mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-21 20:05:42 +02:00
module/xkb: update scroll lock state on indicator state notify event
This commit is contained in:
parent
925dfb736a
commit
01be29d660
1 changed files with 4 additions and 1 deletions
|
@ -499,14 +499,17 @@ event_loop(struct module *mod, xcb_connection_t *conn, int xkb_event_base)
|
|||
const char *name = m->indicators.names[i];
|
||||
bool is_caps = strcasecmp(name, "caps lock") == 0;
|
||||
bool is_num = strcasecmp(name, "num lock") == 0;
|
||||
bool is_scroll = strcasecmp(name, "scroll lock") == 0;
|
||||
|
||||
if (is_caps || is_num) {
|
||||
if (is_caps || is_num || is_scroll) {
|
||||
mtx_lock(&mod->lock);
|
||||
|
||||
if (is_caps)
|
||||
m->caps_lock = enabled;
|
||||
else if (is_num)
|
||||
m->num_lock = enabled;
|
||||
else if (is_scroll)
|
||||
m->scroll_lock = enabled;
|
||||
|
||||
mtx_unlock(&mod->lock);
|
||||
need_refresh = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue