src/video/wayland/SDL_waylandvideo.c
changeset 10530 2a3f8bc23daa
parent 10492 786e10ab72d8
child 10583 974f8ebcb819
     1.1 --- a/src/video/wayland/SDL_waylandvideo.c	Thu Oct 13 04:53:01 2016 -0700
     1.2 +++ b/src/video/wayland/SDL_waylandvideo.c	Thu Oct 13 04:54:43 2016 -0700
     1.3 @@ -340,6 +340,11 @@
     1.4  
     1.5      _this->driverdata = data;
     1.6  
     1.7 +    data->xkb_context = WAYLAND_xkb_context_new(0);
     1.8 +    if (!data->xkb_context) {
     1.9 +        return SDL_SetError("Failed to create XKB context");
    1.10 +    }
    1.11 +
    1.12      data->display = WAYLAND_wl_display_connect(NULL);
    1.13      if (data->display == NULL) {
    1.14          return SDL_SetError("Failed to connect to a Wayland display");
    1.15 @@ -358,11 +363,6 @@
    1.16      // Second roundtrip to receive all output events.
    1.17      WAYLAND_wl_display_roundtrip(data->display);
    1.18  
    1.19 -    data->xkb_context = WAYLAND_xkb_context_new(0);
    1.20 -    if (!data->xkb_context) {
    1.21 -        return SDL_SetError("Failed to create XKB context");
    1.22 -    }
    1.23 -
    1.24      Wayland_InitMouse();
    1.25  
    1.26      /* Get the surface class name, usually the name of the application */