internal static Point GetTopLevelWindowLocation (Hwnd hwnd)
{
IntPtr dummy;
int x, y;
Hwnd.Borders frame;
XTranslateCoordinates (DisplayHandle, hwnd.whole_window, RootWindow, 0, 0, out x, out y, out dummy);
frame = FrameExtents (hwnd.whole_window);
x -= frame.left;
y -= frame.top;
return new Point (x, y);
}