mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-07-10 11:04:10 -04:00
Merge pull request #1148 from WeraPea/fix-get_keyboard_grab
fix: correct get_keyboard_grab judge
This commit is contained in:
commit
10cdba3e8a
2 changed files with 3 additions and 5 deletions
|
|
@ -103,11 +103,7 @@ get_keyboard_grab(KeyboardGroup *keyboard) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// kb_group是一个物理键盘组,它不应该被过滤掉
|
||||
if (keyboard != kb_group)
|
||||
return NULL;
|
||||
|
||||
if (is_keyboard_emulated_by_input_method(&keyboard->wlr_group->keyboard,
|
||||
if (is_keyboard_emulated_by_input_method(keyboard->virtual_keyboard,
|
||||
input_method)) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -493,6 +493,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
struct wlr_keyboard_group *wlr_group;
|
||||
struct wlr_keyboard *virtual_keyboard;
|
||||
|
||||
int32_t nsyms;
|
||||
const xkb_keysym_t *keysyms; /* invalid if nsyms == 0 */
|
||||
|
|
@ -7271,6 +7272,7 @@ void virtualkeyboard(struct wl_listener *listener, void *data) {
|
|||
wlr_seat_set_capabilities(seat,
|
||||
seat->capabilities | WL_SEAT_CAPABILITY_KEYBOARD);
|
||||
KeyboardGroup *group = createkeyboardgroup();
|
||||
group->virtual_keyboard = &kb->keyboard;
|
||||
/* Set the keymap to match the group keymap */
|
||||
wlr_keyboard_set_keymap(&kb->keyboard, group->wlr_group->keyboard.keymap);
|
||||
LISTEN(&kb->keyboard.base.events.destroy, &group->destroy,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue