- if (XF86VidModeGetModeLine(ob_display, ob_screen, &dot, &mode)) {
+#ifdef VIDMODE
+ if (i == 0 && /* primary head */
+ extensions_vidmode &&
+ XF86VidModeGetViewPort(ob_display, ob_screen, &x, &y) &&
+ /* get the mode last so the mode.privsize isnt freed incorrectly */
+ XF86VidModeGetModeLine(ob_display, ob_screen, &dot, &mode)) {
+ x += a->x;
+ y += a->y;