How to override Window Manager placement of windows.

Hello, everyone!

Is it possible to create a window in X11/WM, but override the position Window Manager sets for the window. I'm not sure how to use 'override_redirect' flag, and what to do in order to use it. But the problem with the flag is also that it probably will disable all decorations given by the WM. Actually I just need to be able to set the windows position programmatically, while the WM puts every window (except popups) at the center of the display. I can only move windows with mouse and it's not the best idea to emulate mouse events to move windows.

AFAIK, override_redirect should only be used with menus, tool tips and the like.

Which toolkit are you using?

It is indeed possible to do so. The Simple Directmedia Layer is a frequently valuable code resource just for containing so much generic code covering so many different platforms, and one of the things it does is check an environment variable to see if it should alter where it puts the window...

Here is the source code for SDL_x11video.c, please check out the code in X11_SetSizeHints, it seems to use XMoveWindow among other things.