To access the contents of a mouse position list in the
@var{position} slot of a click event, you should typically use the
-functions documented in @ref{Accessing Mouse}. The explicit format of
-the list depends on where the click occurred. For clicks in the text
-area, mode line, header line, tab line, or in the fringe or marginal
-areas, the mouse position list has the form
+functions documented in @ref{Accessing Mouse}.
+
+The explicit format of the list depends on where the click occurred.
+For clicks in the text area, mode line, header line, tab line, or in
+the fringe or marginal areas, the mouse position list has the form
@example
(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
@c The 'top', 'bottom', and 'end-scroll' codes don't seem to be used.
@end table
+For clicks on the frame's internal border (@pxref{Frame Layout}),
+@var{position} has this form:
+
+@example
+ (@var{frame} @var{part} (@var{X} . @var{Y}) @var{timestamp})
+@end example
+
+@table @asis
+@item @var{frame}
+The frame whose internal border was clicked on.
+
+@item @var{part}
+The part of the internal border which was clicked on. This can be one
+of the following:
+
+@table @code
+@item nil
+The frame does not have an internal border. This usually happens on
+text-mode frames. This can also happen on GUI frames with internal
+border if the frame doesn't have its @code{drag-internal-border}
+parameter (@pxref{Mouse Dragging Parameters}) set to a non-@code{nil}
+value.
+
+@item left-edge
+@itemx top-edge
+@itemx right-edge
+@itemx bottom-edge
+The click was on the corresponding border at an offset of at least one
+canonical character from the border's nearest corner.
+
+@item top-left-corner
+@itemx top-right-corner
+@itemx bottom-right-corner
+@itemx bottom-left-corner
+The click was on the corresponding corner of the internal border.
+@end table
+
+@end table
+
@node Drag Events
@subsection Drag Events
extra_info)));
}
-#ifdef HAVE_WINDOW_SYSTEM
else if (f)
{
/* Return mouse pixel coordinates here. */
xret = XFIXNUM (x);
yret = XFIXNUM (y);
- if (FRAME_LIVE_P (f)
+#ifdef HAVE_WINDOW_SYSTEM
+ if (FRAME_WINDOW_P (f)
+ && FRAME_LIVE_P (f)
&& FRAME_INTERNAL_BORDER_WIDTH (f) > 0
&& !NILP (get_frame_param (f, Qdrag_internal_border)))
{
posn = builtin_lisp_symbol (internal_border_parts[part]);
}
- }
#endif
+ }
else
window_or_frame = Qnil;