src/video/wayland/SDL_waylandwindow.c
changeset 9467 975453c4e217
parent 9362 dfd8202eb9a7
child 9468 d001cff818bb
equal deleted inserted replaced
9466:510c9a2f0951 9467:975453c4e217
   177         data->extended_surface = qt_surface_extension_get_extended_surface(
   177         data->extended_surface = qt_surface_extension_get_extended_surface(
   178                 c->surface_extension, data->surface);
   178                 c->surface_extension, data->surface);
   179     }
   179     }
   180 #endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
   180 #endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
   181 
   181 
   182     /**
       
   183      * If the user specified 0x0 as the size (turned to 1x1 by SDL_CreateWindow
       
   184      * in SDL_video.c), we want to make the window fill the whole screen
       
   185      **/
       
   186     if (window->w == 1) {
       
   187         window->w = c->screen_allocation.width;
       
   188     }
       
   189     if (window->h == 1) {
       
   190         window->h = c->screen_allocation.height;
       
   191     }
       
   192 
       
   193     data->egl_window = WAYLAND_wl_egl_window_create(data->surface,
   182     data->egl_window = WAYLAND_wl_egl_window_create(data->surface,
   194                                             window->w, window->h);
   183                                             window->w, window->h);
   195 
   184 
   196     /* Create the GLES window surface */
   185     /* Create the GLES window surface */
   197     data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->egl_window);
   186     data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->egl_window);