Hello,
I believe that I have fixed the bug described in this bug report:
It looks like the Windows code for al_get_window_position was trying to compensate for the lack of window decorations on a frameless window. However, it seems that doing so was unnecessary, because GetWindowRect appears to return the correct coordinates regardless of whether or not the Window is frameless. Thus, I removed all of the code that were, apparently, calculating the wrong position for the window and just replaced it with GetWindowRect.
It is possible that my fix is incorrect, as I don't actually know why the original developer added this adjustment code. I tested it on Windows 7 with and without Aero enabled, using both OpenGL and D3D, and using frameless and regular windows for each configuration and it worked fine.
I tested al_get_window_position on Linux, and it did not seem to have the same problems as on Windows.
Here is the patch that contains my changes:
And here is the test program that I used:
I hope this is useful and correct.
-Michael Swiger