Commit 72dd9119 authored by Eli Zaretskii's avatar Eli Zaretskii

Fix posn-at-x-y in builds --without-x

* src/keyboard.c (make_lispy_position): Don't exclude the
window_or_frame = frame case from TTY-only builds.  Reported by
Jared Finder <jared@finder.org>.

* doc/lispref/commands.texi (Click Events): Document the format of
POSITION in click events on the frame's internal border.
parent ace25f20
Pipeline #7365 failed with stage
in 120 minutes and 1 second
......@@ -1346,10 +1346,11 @@ button. @xref{Repeat Events}.
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}
......@@ -1479,6 +1480,45 @@ handle), @code{up} (the up arrow at one end of the scroll bar), or
@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
......
......@@ -5246,7 +5246,6 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
extra_info)));
}
#ifdef HAVE_WINDOW_SYSTEM
else if (f)
{
/* Return mouse pixel coordinates here. */
......@@ -5254,7 +5253,9 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
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)))
{
......@@ -5263,8 +5264,8 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
posn = builtin_lisp_symbol (internal_border_parts[part]);
}
}
#endif
}
else
window_or_frame = Qnil;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment