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
}
}
+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);
+}
\f
/***********************************************************************
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);