mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-17 05:34:11 -04:00
opt: support hot-reload xkb_rules
This commit is contained in:
parent
f5669bb9c6
commit
844b6e049f
2 changed files with 22 additions and 0 deletions
|
|
@ -2831,6 +2831,11 @@ void parse_config(void) {
|
|||
|
||||
// 重置config结构体,确保所有指针初始化为NULL
|
||||
memset(&config, 0, sizeof(config));
|
||||
memset(&xkb_rules_rules, 0, sizeof(xkb_rules_rules));
|
||||
memset(&xkb_rules_model, 0, sizeof(xkb_rules_model));
|
||||
memset(&xkb_rules_layout, 0, sizeof(xkb_rules_layout));
|
||||
memset(&xkb_rules_variant, 0, sizeof(xkb_rules_variant));
|
||||
memset(&xkb_rules_options, 0, sizeof(xkb_rules_options));
|
||||
|
||||
// 初始化动态数组的指针为NULL,避免野指针
|
||||
config.window_rules = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue