src/video/wayland/SDL_waylandwindow.c
changeset 8766 e5f584f77609
parent 8712 e33b5f7df761
child 8978 7753e4fd3d1d
equal deleted inserted replaced
8765:cdf0aad10fea 8766:e5f584f77609
    39 
    39 
    40 static void
    40 static void
    41 handle_configure(void *data, struct wl_shell_surface *shell_surface,
    41 handle_configure(void *data, struct wl_shell_surface *shell_surface,
    42                  uint32_t edges, int32_t width, int32_t height)
    42                  uint32_t edges, int32_t width, int32_t height)
    43 {
    43 {
       
    44     SDL_WindowData *wind = (SDL_WindowData *)data;
       
    45     SDL_Window *window = wind->sdlwindow;
       
    46     struct wl_region *region;
       
    47 
       
    48     window->w = width;
       
    49     window->h = height;
       
    50     WAYLAND_wl_egl_window_resize(wind->egl_window, window->w, window->h, 0, 0);
       
    51 
       
    52     region = wl_compositor_create_region(wind->waylandData->compositor);
       
    53     wl_region_add(region, 0, 0, window->w, window->h);
       
    54     wl_surface_set_opaque_region(wind->surface, region);
       
    55     wl_region_destroy(region);
       
    56     SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, window->w, window->h);
    44 }
    57 }
    45 
    58 
    46 static void
    59 static void
    47 handle_popup_done(void *data, struct wl_shell_surface *shell_surface)
    60 handle_popup_done(void *data, struct wl_shell_surface *shell_surface)
    48 {
    61 {