1XSetSelectionOwner(3)           XLIB FUNCTIONS           XSetSelectionOwner(3)
2
3
4

NAME

6       XSetSelectionOwner,  XGetSelectionOwner, XConvertSelection - manipulate
7       window selection
8

SYNTAX

10       int XSetSelectionOwner(Display *display, Atom selection, Window  owner,
11              Time time);
12
13       Window XGetSelectionOwner(Display *display, Atom selection);
14
15       int  XConvertSelection(Display  *display,  Atom selection, Atom target,
16              Atom property, Window requestor, Time time);
17

ARGUMENTS

19       display   Specifies the connection to the X server.
20
21       owner     Specifies the owner of the specified selection atom.  You can
22                 pass a window or None.
23
24       property  Specifies the property name.  You also can pass None.
25
26       requestor Specifies the requestor.
27
28       selection Specifies the selection atom.
29
30       target    Specifies the target atom.
31
32       time      Specifies  the time.  You can pass either a timestamp or Cur‐
33                 rentTime.
34

DESCRIPTION

36       The XSetSelectionOwner function changes the owner and last-change  time
37       for  the specified selection and has no effect if the specified time is
38       earlier than the current last-change time of the specified selection or
39       is  later  than  the current X server time.  Otherwise, the last-change
40       time is set to the specified time, with  CurrentTime  replaced  by  the
41       current  server  time.   If the owner window is specified as None, then
42       the owner of the selection becomes None (that is,  no  owner).   Other‐
43       wise,  the  owner of the selection becomes the client executing the re‐
44       quest.
45
46       If the new owner (whether a client or None) is not the same as the cur‐
47       rent owner of the selection and the current owner is not None, the cur‐
48       rent owner is sent a SelectionClear event.  If the client that  is  the
49       owner  of  a  selection is later terminated (that is, its connection is
50       closed) or if the owner window it has specified in the request is later
51       destroyed,  the  owner  of the selection automatically reverts to None,
52       but the last-change time is not affected.  The selection atom is  unin‐
53       terpreted  by  the X server.  XGetSelectionOwner returns the owner win‐
54       dow, which is reported in SelectionRequest and  SelectionClear  events.
55       Selections are global to the X server.
56
57       XSetSelectionOwner can generate BadAtom and BadWindow errors.
58
59       The  XGetSelectionOwner  function returns the window ID associated with
60       the window that currently owns the specified selection.  If  no  selec‐
61       tion was specified, the function returns the constant None.  If None is
62       returned, there is no owner for the selection.
63
64       XGetSelectionOwner can generate a BadAtom error.
65
66       XConvertSelection requests that the specified selection be converted to
67       the specified target type:
68
69       •    If  the specified selection has an owner, the X server sends a Se‐
70            lectionRequest event to that owner.
71
72       •    If no owner for the specified selection exists, the X server  gen‐
73            erates  a  SelectionNotify  event  to  the requestor with property
74            None.
75
76       The arguments are passed on unchanged in either of the  events.   There
77       are two predefined selection atoms: PRIMARY and SECONDARY.
78
79       XConvertSelection can generate BadAtom and BadWindow errors.
80

DIAGNOSTICS

82       BadAtom   A value for an Atom argument does not name a defined Atom.
83
84       BadWindow A value for a Window argument does not name a defined Window.
85

SEE ALSO

87       Xlib - C Language X Interface
88
89
90
91X Version 11                     libX11 1.7.2            XSetSelectionOwner(3)
Impressum