comparison src/video/x11/SDL_x11window.c @ 3225:5859d0a0c519

Removed arbitrary window size limitation
author Sam Lantinga <slouken@libsdl.org>
date Sun, 02 Aug 2009 14:27:48 +0000
parents 494559cc723b
children 08c5964f2a34
comparison
equal deleted inserted replaced
3224:62d285f6e5a9 3225:5859d0a0c519
536 } 536 }
537 #endif 537 #endif
538 538
539 sizehints = XAllocSizeHints(); 539 sizehints = XAllocSizeHints();
540 if (sizehints) { 540 if (sizehints) {
541 if ((window->flags & SDL_WINDOW_RESIZABLE) 541 if (!(window->flags & SDL_WINDOW_RESIZABLE)
542 && !(window->flags & SDL_WINDOW_FULLSCREEN)) { 542 || (window->flags & SDL_WINDOW_FULLSCREEN)) {
543 sizehints->min_width = 32;
544 sizehints->min_height = 32;
545 sizehints->max_height = 4096;
546 sizehints->max_width = 4096;
547 } else {
548 sizehints->min_width = sizehints->max_width = window->w; 543 sizehints->min_width = sizehints->max_width = window->w;
549 sizehints->min_height = sizehints->max_height = window->h; 544 sizehints->min_height = sizehints->max_height = window->h;
550 } 545 sizehints->flags = PMaxSize | PMinSize;
551 sizehints->flags = PMaxSize | PMinSize; 546 }
552 if (!(window->flags & SDL_WINDOW_FULLSCREEN) 547 if (!(window->flags & SDL_WINDOW_FULLSCREEN)
553 && window->x != SDL_WINDOWPOS_UNDEFINED 548 && window->x != SDL_WINDOWPOS_UNDEFINED
554 && window->y != SDL_WINDOWPOS_UNDEFINED) { 549 && window->y != SDL_WINDOWPOS_UNDEFINED) {
555 sizehints->x = x; 550 sizehints->x = x;
556 sizehints->y = y; 551 sizehints->y = y;