mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-15 06:59:54 -05:00
opt: Optimize the mod key state of the virtual keyboard
This commit is contained in:
parent
6927d1f6c2
commit
045e1607cb
2 changed files with 31 additions and 16 deletions
|
|
@ -111,8 +111,7 @@ get_keyboard_grab(KeyboardGroup *keyboard) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// 如果键盘不是物理键盘组的键盘,则返回NULL
|
||||
// kb_group是一个物理键盘组,它的键盘是物理键盘
|
||||
// kb_group是一个物理键盘组,它不应该被过滤掉
|
||||
if (keyboard != kb_group)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -349,9 +348,7 @@ static void handle_input_method_grab_keyboard(struct wl_listener *listener,
|
|||
wl_container_of(listener, relay, input_method_grab_keyboard);
|
||||
struct wlr_input_method_keyboard_grab_v2 *keyboard_grab = data;
|
||||
|
||||
// 活动键盘应该是从物理键盘组中获取的,
|
||||
// wlr_seat_get_keyboard可能获取到的是虚拟键盘,所以会造成设置错误
|
||||
struct wlr_keyboard *active_keyboard = &kb_group->wlr_group->keyboard;
|
||||
struct wlr_keyboard *active_keyboard = wlr_seat_get_keyboard(seat);
|
||||
|
||||
if (!is_keyboard_emulated_by_input_method(active_keyboard,
|
||||
relay->input_method)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue