Some display cards especially laptop/notebook support multiple monitors.
For Windows/win32, the left/top boundary of the virtual screen is:
dpy_x_ofs = GetSystemMetrics(SM_XVIRTUALSCREEN); dpy_y_ofs = GetSystemMetrics(SM_YVIRTUALSCREEN); |
If the desktop monitor(with taskbar & desktop icon) is configured at the right of the blank montor, dpy_x_ofs can be negative. In gtk/win32, the left/top corner of the virtual screen is always (0,0). The coordinate is shifted.
In other words, to convert a windows point (wx, wy) to gtk (gx, gy), you have to
gx = wx - dpy_x_ofs; gy = wy - dpy_y_ofs; |