No longer forcing centered window position. SF.net Bug #3138446

This commit is contained in:
William Kendrick 2010-12-17 17:47:37 +00:00
parent f7f347541f
commit 1f1304c662
2 changed files with 16 additions and 3 deletions

View file

@ -8,7 +8,7 @@ http://www.tuxpaint.org/
$Id$
2010.December.15 (0.9.22)
2010.December.17 (0.9.22)
* New Tools:
----------
* Label - A tool to add text to a drawing, which can be modified or
@ -50,10 +50,17 @@ $Id$
* Other Improvements:
-------------------
* Tux Paint (in windowed mode) now only centers itself if
no specific positioning has been provided via
the SDL_VIDEO_WINDOW_POS environment variable.
(SourceForge Bug #3138446)
* Adding a mouse mode to avoid the need to drag the mouse.
FIXME: Explain
by Ankit Choudary <ankit.goaldecided@gmail.com>
* Allowing to paint with the keyboard.
FIXME: Explain
by Ankit Choudary.
* Creating thumbnails for the starters we provide.

View file

@ -21845,7 +21845,12 @@ static void setup(void)
if (!fullscreen)
{
putenv((char *) "SDL_VIDEO_WINDOW_POS=center");
int set_window_pos = 0;
if (getenv((char *) "SDL_VIDEO_WINDOW_POS") == NULL)
{
set_window_pos = 1;
putenv((char *) "SDL_VIDEO_WINDOW_POS=center");
}
#ifdef USE_HWSURFACE
screen = SDL_SetVideoMode(WINDOW_WIDTH, WINDOW_HEIGHT,
@ -21855,7 +21860,8 @@ static void setup(void)
VIDEO_BPP, SDL_SWSURFACE);
#endif
putenv((char *) "SDL_VIDEO_WINDOW_POS=nopref");
if (set_window_pos)
putenv((char *) "SDL_VIDEO_WINDOW_POS=nopref");
}
if (screen == NULL)