Standalone GUI application misaligned or shifted due to metacity
I have a standalone GUI application (Qt based) which runs on Ubuntu 12.04 but without any desktop manager. Application is started from ".xinitrc" and once it is executed it takes over the full screen. As some options provided in the GUI requires window management, I am using metacity (called from ".xinitrc" ).
For some reason if the application is started while metacity is running, the whole display is shifted towards right-bottom. So there are black bars on left and top and I miss a portion of GUI or the right-botton. From what I can see of the display, it does not look like a resolution problem("xrandr -s 1360x768" in ".xinitrc").
If I make sure that metacity is not running when the application comes up, the display looks fine. I tried some workarounds to make metacity start after the GUI application, but I am not satisfied with that.
Can anyone suggest a better fix for this. I did not find any gconf setting for metacity, related to positioning or alignment. I googled for any related issues but did not get any solutions. I tried some other window managers (fluxbox,awesome,twm) but they all fail to meet my requirements in one way or the other.