I'm working on a dual screen setup. The screens are positioned one on top of the other. I create a window in SDL that is the size of both screens combined. The window appears at the top left of the BOTTOM screen. I want it to be at the top left of the TOP screen. When I try to move it with XMoveWindow, it shifts the image inside of it instead of moving the window. I'm rendering an OpenGL scene. I'm using linux and SDL 1.2, I know, there's the problem, but I can't move to SDL2.
Any ideas what's going on?
I have an SDL window I've created with
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE);
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
screen = SDL_SetVideoMode(w, h, 32, SDL_HWACCEL | SDL_OPENGL | SDL_GL_DOUBLEBUFFER);
But when I run run my program, the window stays in place and the image inside it has been shifted by 200,-200.
#include <SDL/SDL.h>
#include <SDL/SDL_syswm.h>
#include <GL/gl.h>
#include <X11/Xlib.h>
void move()
{
SDL_SysWMinfo info;
SDL_VERSION(&info.version);
if (SDL_GetWMInfo(&info))
{
// Put the window at origin!!!!!
cout << "xmovewindow: " << XMoveWindow(info.info.x11.display, info.info.x11.window, 200, -200) << endl;
// prints "xmovewindow: 1"
}
}
Halp!