I have a very strange problem in XBoard. Now that it saves all settings, including the window positions, I try to make all windows pop up in the same place as on the previous sesion. This was already done for some windows during a session, but now the information survives to the next session through the settings file.
Problem is that it does not work properly (and it also did not within a session). I can trace the problem to unexpected (probably wrong) behaviour of the Xtoolkit calls XtSetValues / XtGetValues, when used with the arguments XtNx and XtNy. The values I Get are not the same as those I Set. The x coordinate returned by XtGetValues is always 4 larger than those that I set, the y coordinate 23. (Except when I call XtGetValues immediately after setting them; then they are both zero. Where "immediately" can mean 10 sec later after calling it many times, but before clicking anything in the window.) Is this a known bug in X? Is the (4,23) correction a fixed quantity, or does it depend on other system metrics? The width of the windows also behaves suspicious (although there at least it is "what you Set is what you Get"): when the main window is 418 wide, and I position the EngineOutput window (say) to the right of it so it touches, the difference of the x coordinate of the windows is not 418, but 428. Even the (4,23) correction seems to be subject to rounding: when I apply it, and position two windows exactly on top of each other, when I close and re-open, sometimes they are moved over (1,1), although mostly they pop up as the were.
