src/video/wayland/SDL_waylandevents.c
changeset 9655 5c55c6567bdc
parent 9619 b94b6d0bff0f
child 9656 8a4bcbdeba1c
equal deleted inserted replaced
9654:b9488c689ce3 9655:5c55c6567bdc
   291 keyboard_handle_enter(void *data, struct wl_keyboard *keyboard,
   291 keyboard_handle_enter(void *data, struct wl_keyboard *keyboard,
   292                       uint32_t serial, struct wl_surface *surface,
   292                       uint32_t serial, struct wl_surface *surface,
   293                       struct wl_array *keys)
   293                       struct wl_array *keys)
   294 {
   294 {
   295     struct SDL_WaylandInput *input = data;
   295     struct SDL_WaylandInput *input = data;
       
   296 
       
   297     if (!surface) {
       
   298         /* enter event for a window we've just destroyed */
       
   299         return;
       
   300     }
       
   301  
   296     SDL_WindowData *window = wl_surface_get_user_data(surface);
   302     SDL_WindowData *window = wl_surface_get_user_data(surface);
   297 
   303 
   298     input->keyboard_focus = window;
   304     input->keyboard_focus = window;
   299     window->keyboard_device = input;
   305     window->keyboard_device = input;
   300     if (window) {
   306     if (window) {