SDL window positioning problem on Ubuntu

I am writing some simple code using SDL on Ubuntu, positioning a number of windows, and came across a problem. In that if I place windows as in the code below (increasing the y position of each window)the first 5 windows seem to be in the same y position on the screen, however the y position of the windows have been increased. Is this a Unity,Gnome, Ubuntu or SDL problem? Using SDL_GetWindowPosition it shows the y position has increased which is incorrect.

Code:

for(y=0,x=15;y<=50;y+=5,x+=100) {
win[y/5]=SDL_CreateWindow(“Test”,x,y,90,40,SDL_WINDOW_SHOWN);
SDL_GetWindowPosition(win[y/5],&x1,&y1);
printf(“Window %d: x %d, y %d \n”,[y/5],x1,y1);
}

The window manager has complete freedom to override your window placement,
unfortunately.On Thu, Sep 6, 2012 at 9:17 PM, dosh wrote:

**
I am writing some simple code using SDL on Ubuntu, positioning a number of
windows, and came across a problem. In that if I place windows as in the
code below (increasing the y position of each window)the first 5 windows
seem to be in the same y position on the screen, however the y position of
the windows have been increased. Is this a Unity,Gnome, Ubuntu or SDL
problem? Using SDL_GetWindowPosition it shows the y position has increased
which is incorrect.

Code:

for(y=0,x=15;y<=50;y+=5,x+=100) {
win[y/5]=SDL_CreateWindow(“Test”,x,y,90,40,SDL_WINDOW_SHOWN);
SDL_GetWindowPosition(win[y/5],&x1,&y1);
printf(“Window %d: x %d, y %d \n”,[y/5],x1,y1);
}


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Does the window manager respond to environment variables that provide
control of window position?

The window manager has complete freedom to override your window placement,On Fri, Sep 7, 2012 at 12:37 AM, Sam Lantinga wrote:

unfortunately.

On Thu, Sep 6, 2012 at 9:17 PM, dosh wrote:

**
I am writing some simple code using SDL on Ubuntu, positioning a number
of windows, and came across a problem. In that if I place windows as in the
code below (increasing the y position of each window)the first 5 windows
seem to be in the same y position on the screen, however the y position of
the windows have been increased. Is this a Unity,Gnome, Ubuntu or SDL
problem? Using SDL_GetWindowPosition it shows the y position has increased
which is incorrect.

Code:

for(y=0,x=15;y<=50;y+=5,x+=100) {
win[y/5]=SDL_CreateWindow(“Test”,x,y,90,40,SDL_WINDOW_SHOWN);
SDL_GetWindowPosition(win[y/5],&x1,&y1);
printf(“Window %d: x %d, y %d \n”,[y/5],x1,y1);
}


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Thanks Sam

I’m just going to have to find another way around my problem.

Sam Lantinga wrote:> The window manager has complete freedom to override your window placement, unfortunately.

On Thu, Sep 6, 2012 at 9:17 PM, dosh <@dosh (@dosh)> wrote:

  I am writing some simple code using SDL on Ubuntu, positioning a number of windows, and came across a problem. In that if I place windows as in the code below (increasing the y position of each window)the first 5 windows seem to be in the same y position on the screen, however the y position of the windows have been increased. Is this a Unity,Gnome, Ubuntu or SDL problem? Using SDL_GetWindowPosition it shows the y position has increased which is incorrect.




Code:

for(y=0,x=15;y<=50;y+=5,x+=100) {
? win[y/5]=SDL_CreateWindow(“Test”,x,y,90,40,SDL_WINDOW_SHOWN);?
? SDL_GetWindowPosition(win[y/5],&x1,&y1);
? printf(“Window %d: x %d, y %d \n”,[y/5],x1,y1);
}


SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)