Function: window-at

window-at is a function defined in window.c.

Signature

(window-at X Y &optional FRAME)

Documentation

Return window containing coordinates X and Y on FRAME.

FRAME must be a live frame and defaults to the selected one. The top left corner of the frame is considered to be row 0, column 0.

Source Code

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

  CHECK_NUMBER (x);
  CHECK_NUMBER (y);

  return window_from_coordinates (f,
				  (FRAME_PIXEL_X_FROM_CANON_X (f, x)
				   + FRAME_INTERNAL_BORDER_WIDTH (f)),
				  (FRAME_PIXEL_Y_FROM_CANON_Y (f, y)
				   + FRAME_INTERNAL_BORDER_WIDTH (f)),
				  0, false, false);
}