aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/xfns.c b/src/xfns.c
index b8a1914186c..5f5194d78f4 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5720,7 +5720,7 @@ x_sync (struct frame *f)
5720 ***********************************************************************/ 5720 ***********************************************************************/
5721 5721
5722DEFUN ("x-change-window-property", Fx_change_window_property, 5722DEFUN ("x-change-window-property", Fx_change_window_property,
5723 Sx_change_window_property, 2, 6, 0, 5723 Sx_change_window_property, 2, 7, 0,
5724 doc: /* Change window property PROP to VALUE on the X window of FRAME. 5724 doc: /* Change window property PROP to VALUE on the X window of FRAME.
5725PROP must be a string. VALUE may be a string or a list of conses, 5725PROP must be a string. VALUE may be a string or a list of conses,
5726numbers and/or strings. If an element in the list is a string, it is 5726numbers and/or strings. If an element in the list is a string, it is
@@ -5735,9 +5735,12 @@ FORMAT gives the size in bits of each element if VALUE is a list.
5735It must be one of 8, 16 or 32. 5735It must be one of 8, 16 or 32.
5736If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8. 5736If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8.
5737If OUTER-P is non-nil, the property is changed for the outer X window of 5737If OUTER-P is non-nil, the property is changed for the outer X window of
5738FRAME. Default is to change on the edit X window. */) 5738FRAME. Default is to change on the edit X window.
5739If SOURCE is non-nil, set the property on that window instead of from
5740FRAME. The number 0 denotes the root window. */)
5739 (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, 5741 (Lisp_Object prop, Lisp_Object value, Lisp_Object frame,
5740 Lisp_Object type, Lisp_Object format, Lisp_Object outer_p) 5742 Lisp_Object type, Lisp_Object format, Lisp_Object outer_p,
5743 Lisp_Object source)
5741{ 5744{
5742 struct frame *f = decode_window_system_frame (frame); 5745 struct frame *f = decode_window_system_frame (frame);
5743 Atom prop_atom; 5746 Atom prop_atom;
@@ -5801,8 +5804,17 @@ FRAME. Default is to change on the edit X window. */)
5801 target_type = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (type), False); 5804 target_type = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (type), False);
5802 } 5805 }
5803 5806
5804 if (! NILP (outer_p)) w = FRAME_OUTER_WINDOW (f); 5807 if (! NILP (source))
5805 else w = FRAME_X_WINDOW (f); 5808 {
5809 CONS_TO_INTEGER (source, Window, w);
5810 if (! w)
5811 w = FRAME_DISPLAY_INFO (f)->root_window;
5812 }
5813 else
5814 {
5815 if (! NILP (outer_p)) w = FRAME_OUTER_WINDOW (f);
5816 else w = FRAME_X_WINDOW (f);
5817 }
5806 5818
5807 XChangeProperty (FRAME_X_DISPLAY (f), w, 5819 XChangeProperty (FRAME_X_DISPLAY (f), w,
5808 prop_atom, target_type, element_format, PropModeReplace, 5820 prop_atom, target_type, element_format, PropModeReplace,