Commit c978536f authored by Julien Danjou's avatar Julien Danjou Committed by Stefan Monnier
Browse files

* src/frame.c (Fframe_pointer_visible_p):

Add `frame-pointer-visible-p' to get the pointer visibility.
parent 43f964fc
......@@ -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
......
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
......
......@@ -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);
......
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