Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()

Also fixed Cocoa implementation so that it affects client area, not the whole window area.
This commit is contained in:
Sam Lantinga 2012-12-31 12:15:25 -08:00
parent ce28a79602
commit 1a92f18381
11 changed files with 148 additions and 4 deletions

View file

@ -80,6 +80,15 @@ main(int argc, char *argv[])
SDLTest_CommonEvent(state, &event, &done);
if (event.type == SDL_WINDOWEVENT) {
if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
SDL_Window *window = SDL_GetWindowFromID(event.window.windowID);
if (window) {
printf("Window %d resized to %dx%d\n",
event.window.windowID,
event.window.data1,
event.window.data2);
}
}
if (event.window.event == SDL_WINDOWEVENT_MOVED) {
SDL_Window *window = SDL_GetWindowFromID(event.window.windowID);
if (window) {