weston-simple-im: Create our own xkb_context
There's no need to use the struct display xkb_context, we can just create
out ow. This reverts c31288daf1
.
This commit is contained in:
parent
1199b16f02
commit
8c03616c39
|
@ -46,6 +46,7 @@ struct compose_seq {
|
|||
struct simple_im {
|
||||
struct input_method *input_method;
|
||||
struct input_method_context *context;
|
||||
struct xkb_context *xkb_context;
|
||||
struct display *display;
|
||||
struct wl_keyboard *keyboard;
|
||||
struct keyboard_input *keyboard_input;
|
||||
|
@ -464,8 +465,14 @@ main(int argc, char *argv[])
|
|||
return -1;
|
||||
}
|
||||
|
||||
simple_im.xkb_context = xkb_context_new(0);
|
||||
if (simple_im.xkb_context == NULL) {
|
||||
fprintf(stderr, "Failed to create XKB context\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
simple_im.context = NULL;
|
||||
simple_im.keyboard_input = keyboard_input_create(display_get_xkb_context(simple_im.display));
|
||||
simple_im.keyboard_input = keyboard_input_create(simple_im.xkb_context);
|
||||
keyboard_input_set_user_data(simple_im.keyboard_input, &simple_im);
|
||||
keyboard_input_set_key_handler(simple_im.keyboard_input, simple_im_key_handler);
|
||||
|
||||
|
|
|
@ -4024,12 +4024,6 @@ display_get_serial(struct display *display)
|
|||
return display->serial;
|
||||
}
|
||||
|
||||
struct xkb_context *
|
||||
display_get_xkb_context(struct display *display)
|
||||
{
|
||||
return display->xkb_context;
|
||||
}
|
||||
|
||||
EGLDisplay
|
||||
display_get_egl_display(struct display *d)
|
||||
{
|
||||
|
|
|
@ -79,9 +79,6 @@ display_get_output(struct display *display);
|
|||
uint32_t
|
||||
display_get_serial(struct display *display);
|
||||
|
||||
struct xkb_context *
|
||||
display_get_xkb_context(struct display *display);
|
||||
|
||||
typedef void (*display_global_handler_t)(struct display *display,
|
||||
uint32_t name,
|
||||
const char *interface,
|
||||
|
|
Loading…
Reference in New Issue