# HG changeset patch # User Thomas Perl # Date 1396711174 -7200 # Sat Apr 05 17:19:34 2014 +0200 # Node ID 41b646abe0ecc1c9bf3cf1d49bf8cc3e49da7003 # Parent 715d401184a20f712241508d707649f5a473725a Wayland: Resize windows with 0x0 requested size to screen size This makes it in line with other platforms, where SDL_CreateWindow() with width=0, height=0 and SDL_WINDOW_FULLSCREEN opens a fullscreen window. diff -r 715d401184a2 -r 41b646abe0ec src/video/wayland/SDL_waylandwindow.c --- a/src/video/wayland/SDL_waylandwindow.c Fri Apr 04 23:56:15 2014 +0200 +++ b/src/video/wayland/SDL_waylandwindow.c Sat Apr 05 17:19:34 2014 +0200 @@ -164,6 +164,18 @@ c->surface_extension, data->surface); } #endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ + + /** + * If the user specified 0x0 as the size (turned to 1x1 by SDL_CreateWindow + * in SDL_video.c), we want to make the window fill the whole screen + **/ + if (window->w == 1) { + window->w = c->screen_allocation.width; + } + if (window->h == 1) { + window->h = c->screen_allocation.height; + } + data->egl_window = WAYLAND_wl_egl_window_create(data->surface, window->w, window->h);