Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
keyboard: expose pointer to vitrual keyboard
Browse files Browse the repository at this point in the history
For input-method keyboard grab to check if event is from virtual
keyboard of the same client.
  • Loading branch information
xdavidwu committed Jan 21, 2020
1 parent 3ad9e9a commit 5d7c756
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion include/wlr/types/wlr_keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ struct wlr_keyboard_modifiers {
xkb_mod_mask_t group;
};

struct wlr_virtual_keyboard_v1;

struct wlr_keyboard {
const struct wlr_keyboard_impl *impl;
struct wlr_keyboard_group *group;
Expand All @@ -67,7 +69,7 @@ struct wlr_keyboard {
int32_t delay;
} repeat_info;

bool virtual_keyboard;
struct wlr_virtual_keyboard_v1 *virtual_keyboard;

struct {
/**
Expand Down
2 changes: 1 addition & 1 deletion types/wlr_virtual_keyboard_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static void virtual_keyboard_manager_create_virtual_keyboard(
return;
}
wlr_keyboard_init(keyboard, &keyboard_impl);
keyboard->virtual_keyboard = true;
keyboard->virtual_keyboard = virtual_keyboard;

struct wl_resource *keyboard_resource = wl_resource_create(client,
&zwp_virtual_keyboard_v1_interface, wl_resource_get_version(resource),
Expand Down

0 comments on commit 5d7c756

Please sign in to comment.