* src/frame.c (Fframe_pointer_visible_p):
Add `frame-pointer-visible-p' to get the pointer visibility.
This commit is contained in:
parent
43f964fcf0
commit
c978536f74
3 changed files with 29 additions and 0 deletions
|
@ -1748,6 +1748,15 @@ If @var{frame} is not visible, this function does nothing. The return
|
|||
value is not significant.
|
||||
@end defun
|
||||
|
||||
@defun frame-pointer-visible-p &optional frame
|
||||
This predicate function returns non-@code{nil} if the mouse pointer
|
||||
displayed on @var{frame} is visible; otherwise it returns @code{nil}.
|
||||
@var{frame} omitted or @code{nil} means the selected frame. This is
|
||||
useful when @code{make-pointer-invisible} is set to @code{t}: it
|
||||
allows to know if the pointer has been hidden.
|
||||
@xref{Mouse Avoidance,,,emacs}.
|
||||
@end defun
|
||||
|
||||
@need 3000
|
||||
|
||||
@node Pop-Up Menus
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-10-18 Julien Danjou <julien@danjou.info>
|
||||
|
||||
* frame.c (Fframe_pointer_visible_p):
|
||||
Add `frame-pointer-visible-p' to get the pointer visibility.
|
||||
|
||||
2010-10-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* gnutls.c (emacs_gnutls_read): Return 0 if we get a
|
||||
|
|
15
src/frame.c
15
src/frame.c
|
@ -4314,6 +4314,20 @@ frame_make_pointer_visible (void)
|
|||
}
|
||||
}
|
||||
|
||||
DEFUN ("frame-pointer-visible-p", Fframe_pointer_visible_p,
|
||||
Sframe_pointer_visible_p, 0, 1, 0,
|
||||
doc: /* Return t if the mouse pointer displayed on FRAME is visible.
|
||||
Otherwise it returns nil. FRAME omitted or nil means the
|
||||
selected frame. This is useful when `make-pointer-invisible' is set. */)
|
||||
(Lisp_Object frame)
|
||||
{
|
||||
if (NILP (frame))
|
||||
frame = selected_frame;
|
||||
|
||||
CHECK_FRAME (frame);
|
||||
|
||||
return (XFRAME (frame)->pointer_invisible ? Qnil : Qt);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -4623,6 +4637,7 @@ automatically. See also `mouse-autoselect-window'. */);
|
|||
defsubr (&Sset_frame_width);
|
||||
defsubr (&Sset_frame_size);
|
||||
defsubr (&Sset_frame_position);
|
||||
defsubr (&Sframe_pointer_visible_p);
|
||||
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
defsubr (&Sx_get_resource);
|
||||
|
|
Loading…
Add table
Reference in a new issue