Function: frame-position

frame-position is a function defined in frame.c.

Signature

(frame-position &optional FRAME)

Documentation

Return top left corner of FRAME in pixels.

FRAME must be a live frame and defaults to the selected one. The return value is a cons (x, y) of the coordinates of the top left corner of FRAME's outer frame, in pixels relative to an origin (0, 0) of FRAME's display.

Note that the values returned are not guaranteed to be accurate: The values depend on the underlying window system, and some systems add a constant offset to the values.

View in manual

Source Code

// Defined in /usr/src/emacs/src/frame.c
{
  register struct frame *f = decode_live_frame (frame);

  return Fcons (make_fixnum (f->left_pos), make_fixnum (f->top_pos));
}