summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-09-27 20:03:08 +0800
committerPo Lu <luangruo@yahoo.com>2022-09-27 20:04:56 +0800
commit60b4fe92c81c4e6a533fb05cfa706a155472fb37 (patch)
treed595104e47bc5b478dd4c494165dbd4d5e35d5a1
parentb1c1ff9ee110a9fe739dc4407468f3e9b819484c (diff)
downloademacs-60b4fe92c81c4e6a533fb05cfa706a155472fb37.tar.gz
Improve doc of `x-window-property'
* src/xfns.c (Fx_window_property): Fix errors in doc string and document where to obtain documentation for standardized window properties.
-rw-r--r--src/xfns.c37
1 files changed, 30 insertions, 7 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 4df5ad890e8..539e8c6dbe9 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -7711,17 +7711,40 @@ DEFUN ("x-window-property", Fx_window_property, Sx_window_property,
doc: /* Value is the value of window property PROP on FRAME.
If FRAME is nil or omitted, use the selected frame.
-On X Windows, the following optional arguments are also accepted:
-If TYPE is nil or omitted, get the property as a string.
- Otherwise TYPE is the name of the atom that denotes the expected type.
+On X Windows, the following optional arguments are also accepted: If
+TYPE is nil or omitted, get the property as a string. Otherwise TYPE
+is the name of the atom that denotes the expected type.
+
+If TYPE is the string "AnyPropertyType", decode and return the data
+regardless of what the type really is.
+
+The format of the data returned is the same as a selection conversion
+to the given type. For example, if `x-get-selection-internal' returns
+an integer when the selection data is a given type,
+`x-window-property' will do the same for that type.
+
If WINDOW-ID is non-nil, get the property of that window instead of
- FRAME's X window; the number 0 denotes the root window. This argument
- is separate from FRAME because window IDs are not unique across X
- displays or screens on the same display, so FRAME provides context
- for the window ID.
+FRAME's X window; the number 0 denotes the root window. This argument
+is separate from FRAME because window IDs are not unique across X
+displays, so FRAME provides context for the window ID.
+
If DELETE-P is non-nil, delete the property after retrieving it.
If VECTOR-RET-P is non-nil, return a vector of values instead of a string.
+X allows an arbitrary number of properties to be set on any window.
+However, properties are most often set by the window manager or other
+programs on the root window or FRAME's X window in order to
+communicate information to Emacs and other programs. Most of these
+properties are specified as part of the Extended Window Manager Hints
+and the Inter-Client Communication Conventions Manual, which are
+located here:
+
+ https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html
+
+and
+
+ https://x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html
+
Return value is nil if FRAME doesn't have a property with name PROP or
if PROP has no value of TYPE (always a string in the MS Windows case). */)
(Lisp_Object prop, Lisp_Object frame, Lisp_Object type,