mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
Support window resizing in the SDL 2 winsys
The SDL2 winsys will now set the SDL_WINDOW_RESIZABLE flag on the window before creating it if the resizable property is set on the onscreen. Note that there doesn't appear to be a way in SDL to change the flag later so unlike the other winsyses it will only take affect if it is set before allocating the framebuffer. The winsys now registers a callback for SDL events so that it can report window size changes back to the application. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 0dea9aeb897faf029828379b120970477df3c7d5)
This commit is contained in:

committed by
Robert Bragg

parent
11126a1b7e
commit
9f107ab3fb
@ -99,6 +99,10 @@ main (int argc, char **argv)
|
||||
data.center_y = 0.0f;
|
||||
data.quit = FALSE;
|
||||
|
||||
/* In SDL2, setting resizable only works before allocating the
|
||||
* onscreen */
|
||||
cogl_onscreen_set_resizable (onscreen, TRUE);
|
||||
|
||||
cogl_onscreen_show (onscreen);
|
||||
|
||||
data.triangle = cogl_primitive_new_p2c4 (ctx, COGL_VERTICES_MODE_TRIANGLES,
|
||||
|
Reference in New Issue
Block a user