1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
8 A client application communicates with the X server through the connection you establish with
9 the XOpenDisplay function. A client application sends requests to the X server over this
10 connection. These requests are made by the Xlib functions that are called in the client application.
11 Many Xlib functions cause the X server to generate events, and the user’s typing or moving the
12 pointer can generate events asynchronously. The X server returns events to the client on the same
16 This chapter discusses the following topics associated with events:
20 <listitem><para>Event types</para></listitem>
21 <listitem><para>Event structures</para></listitem>
22 <listitem><para>Event masks</para></listitem>
23 <listitem><para>Event processing</para></listitem>
27 Functions for handling events are dealt with in
28 <link linkend='Event_Handling_Functions'>the next chapter</link>.
31 <sect1 id="Event_Types">
32 <title>Event Types</title>
34 <!-- (SN Event Types -->
38 <indexterm><primary>Event</primary><secondary>types</secondary></indexterm>
39 An event is data generated asynchronously by the X server as a result of some
40 device activity or as side effects of a request sent by an Xlib function.
41 <indexterm><primary>Event</primary></indexterm>
42 Device-related events propagate from the source window to ancestor windows
43 until some client application has selected that event type
44 or until the event is explicitly discarded.
45 The X server generally sends an event to a client application
46 only if the client has specifically asked to be informed of that event type,
47 typically by setting the event-mask attribute of the window.
48 The mask can also be set when you create a window
49 or by changing the window's
51 You can also mask out events that would propagate to ancestor windows
53 do-not-propagate mask of the window's attributes.
55 <symbol>MappingNotify</symbol>
56 events are always sent to all clients.
57 <indexterm><primary>Input Control</primary></indexterm>
58 <indexterm><primary>Output Control</primary></indexterm>
62 An event type describes a specific event generated by the X server.
64 a corresponding constant name is defined in
65 <filename class="headerfile"><X11/X.h></filename>,
66 <indexterm type="file"><primary><filename class="headerfile">X11/X.h</filename></primary></indexterm>
67 <indexterm><primary>Files</primary><secondary><filename class="headerfile"><X11/X.h></filename></secondary></indexterm>
68 <indexterm><primary>Headers</primary><secondary><filename class="headerfile"><X11/X.h></filename></secondary></indexterm>
69 which is used when referring to an event type.
70 <indexterm><primary>Event</primary><secondary>categories</secondary></indexterm>
71 The following table lists the event category
72 and its associated event type or types.
73 The processing associated with these events is discussed in section 10.5.
78 <!-- .\"Event Categories and Event Types -->
82 <informaltable frame='topbot'>
83 <?dbfo keep-together="always" ?>
84 <tgroup cols='2' align='left' colsep='0' rowsep='0'>
85 <colspec colname='c1' colwidth='1.0*'/>
86 <colspec colname='c2' colwidth='4.0*'/>
89 <entry>Event Category</entry>
90 <entry>Event Type</entry>
95 <entry>Keyboard events</entry>
96 <entry><symbol>KeyPress</symbol>,
97 <symbol>KeyRelease</symbol></entry>
100 <entry>Pointer events</entry>
101 <entry><symbol>ButtonPress</symbol>,
102 <symbol>ButtonRelease</symbol>,
103 <symbol>MotionNotify</symbol></entry>
106 <entry>Window crossing events</entry>
107 <entry><symbol>EnterNotify</symbol>,
108 <symbol>LeaveNotify</symbol></entry>
111 <entry>Input focus events</entry>
112 <entry><symbol>FocusIn</symbol>,
113 <symbol>FocusOut</symbol></entry>
116 <entry>Keymap state notification event</entry>
117 <entry><symbol>KeymapNotify</symbol></entry>
120 <entry>Exposure events</entry>
121 <entry><symbol>Expose</symbol>,
122 <symbol>GraphicsExpose</symbol>,
123 <symbol>NoExpose</symbol></entry>
126 <entry>Structure control events</entry>
127 <entry><symbol>CirculateRequest</symbol>,
128 <symbol>ConfigureRequest</symbol>,
129 <symbol>MapRequest</symbol>,
130 <symbol>ResizeRequest</symbol></entry>
133 <entry>Window state notification events</entry>
135 <symbol>CirculateNotify</symbol>,
136 <symbol>ConfigureNotify</symbol>,
137 <symbol>CreateNotify</symbol>,
138 <symbol>DestroyNotify</symbol>,
139 <symbol>GravityNotify</symbol>,
140 <symbol>MapNotify</symbol>,
141 <symbol>MappingNotify</symbol>,
142 <symbol>ReparentNotify</symbol>,
143 <symbol>UnmapNotify</symbol>,
144 <symbol>VisibilityNotify</symbol></entry>
147 <entry>Colormap state notification event</entry>
148 <entry><symbol>ColormapNotify</symbol></entry>
151 <entry>Client communication events</entry>
152 <entry><symbol>ClientMessage</symbol>,
153 <symbol>PropertyNotify</symbol>,
154 <symbol>SelectionClear</symbol>,
155 <symbol>SelectionNotify</symbol>,
156 <symbol>SelectionRequest</symbol></entry>
163 <!-- .\"Table 8-1 lists the event types and the Xlib functions that could cause -->
164 <!-- .\"the X server to generate that event type. -->
165 <!-- .\"The event types are listed alphabetically. -->
166 <!-- .\"Note that the error event is not listed in this table. -->
167 <!-- .\"For a list of the constants associated with an error event, see the Handling -->
168 <!-- .\"Errors section in this chapter. -->
170 <!-- .\".so eventtable -->
173 <sect1 id="Event_Structures">
174 <title>Event Structures</title>
176 <!-- (SN Event Structures -->
181 a corresponding structure is declared in
182 <filename class="headerfile"><X11/Xlib.h></filename>.
183 <indexterm type="file"><primary><filename class="headerfile">X11/Xlib.h</filename></primary></indexterm>
184 <indexterm><primary>Files</primary><secondary><filename class="headerfile"><X11/Xlib.h></filename></secondary></indexterm>
185 <indexterm><primary>Headers</primary><secondary><filename class="headerfile"><X11/Xlib.h></filename></secondary></indexterm>
186 All the event structures have the following common members:
190 <indexterm significance="preferred"><primary>XAnyEvent</primary></indexterm>
192 <literallayout class="monospaced">
197 unsigned long serial; /* # of last request processed by server */
198 Bool send_event; /* true if this came from a SendEvent request */
199 Display *display; /* Display the event was read from */
207 The type member is set to the event type constant name that uniquely identifies
209 For example, when the X server reports a
210 <symbol>GraphicsExpose</symbol>
211 event to a client application, it sends an
212 <structname>XGraphicsExposeEvent</structname>
213 structure with the type member set to
214 <symbol>GraphicsExpose</symbol>.
215 The display member is set to a pointer to the display the event was read on.
216 The send_event member is set to
217 <symbol>True</symbol>
218 if the event came from a
219 <systemitem>SendEvent</systemitem>
221 The serial member is set from the serial number reported in the protocol
222 but expanded from the 16-bit least-significant bits to a full 32-bit value.
223 The window member is set to the window that is most useful to toolkit
228 The X server can send events at any time in the input stream.
229 Xlib stores any events received while waiting for a reply in an event queue
231 Xlib also provides functions that allow you to check events in the event queue
232 (see <link linkend="Event_Queue_Management">section 11.3</link>).
236 In addition to the individual structures declared for each event type, the
237 <structname>XEvent</structname>
238 structure is a union of the individual structures declared for each event type.
239 Depending on the type,
240 you should access members of each event by using the
241 <structname>XEvent</structname>
246 <indexterm significance="preferred"><primary>XEvent</primary></indexterm>
249 <literallayout class="monospaced">
252 typedef union _XEvent {
253 int type; /* must not be changed */
256 XButtonEvent xbutton;
257 XMotionEvent xmotion;
258 XCrossingEvent xcrossing;
259 XFocusChangeEvent xfocus;
260 XExposeEvent xexpose;
261 XGraphicsExposeEvent xgraphicsexpose;
262 XNoExposeEvent xnoexpose;
263 XVisibilityEvent xvisibility;
264 XCreateWindowEvent xcreatewindow;
265 XDestroyWindowEvent xdestroywindow;
268 XMapRequestEvent xmaprequest;
269 XReparentEvent xreparent;
270 XConfigureEvent xconfigure;
271 XGravityEvent xgravity;
272 XResizeRequestEvent xresizerequest;
273 XConfigureRequestEvent xconfigurerequest;
274 XCirculateEvent xcirculate;
275 XCirculateRequestEvent xcirculaterequest;
276 XPropertyEvent xproperty;
277 XSelectionClearEvent xselectionclear;
278 XSelectionRequestEvent xselectionrequest;
279 XSelectionEvent xselection;
280 XColormapEvent xcolormap;
281 XClientMessageEvent xclient;
282 XMappingEvent xmapping;
284 XKeymapEvent xkeymap;
293 <structname>XEvent</structname>
294 structure's first entry always is the type member,
295 which is set to the event type.
296 The second member always is the serial number of the protocol request
297 that generated the event.
298 The third member always is send_event,
301 that indicates if the event was sent by a different client.
302 The fourth member always is a display,
303 which is the display that the event was read from.
304 Except for keymap events,
305 the fifth member always is a window,
306 which has been carefully selected to be useful to toolkit dispatchers.
307 To avoid breaking toolkits,
308 the order of these first five entries is not to change.
309 Most events also contain a time member,
310 which is the time at which an event occurred.
311 In addition, a pointer to the generic event must be cast before it
312 is used to access any other information in the structure.
315 <sect1 id="Event_Masks">
316 <title>Event Masks</title>
318 <!-- (SN Event Masks -->
322 <indexterm significance="preferred"><primary>Event mask</primary></indexterm>
323 Clients select event reporting of most events relative to a window.
324 To do this, pass an event mask to an Xlib event-handling
325 function that takes an event_mask argument.
326 The bits of the event mask are defined in
327 <filename class="headerfile"><X11/X.h></filename>.
328 <indexterm type="file"><primary><filename class="headerfile">X11/X.h</filename></primary></indexterm>
329 <indexterm><primary>Files</primary><secondary><filename class="headerfile"><X11/X.h></filename></secondary></indexterm>
330 <indexterm><primary>Headers</primary><secondary><filename class="headerfile"><X11/X.h></filename></secondary></indexterm>
331 Each bit in the event mask maps to an event mask name,
332 which describes the event or events you want the X server to
333 return to a client application.
337 Unless the client has specifically asked for them,
338 most events are not reported to clients when they are generated.
339 Unless the client suppresses them by setting graphics-exposures in the GC to
340 <symbol>False</symbol>,
341 <symbol>GraphicsExpose</symbol>
343 <symbol>NoExpose</symbol>
344 are reported by default as a result of
345 <xref linkend='XCopyPlane' xrefstyle='select: title'/>
347 <xref linkend='XCopyArea' xrefstyle='select: title'/>.
348 <symbol>SelectionClear</symbol>,
349 <symbol>SelectionRequest</symbol>,
350 <symbol>SelectionNotify</symbol>,
352 <symbol>ClientMessage</symbol>
354 Selection-related events are only sent to clients cooperating
356 (see <link linkend="Obtaining_and_Changing_Window_Properties">section 4.5</link>).
357 When the keyboard or pointer mapping is changed,
358 <symbol>MappingNotify</symbol>
359 is always sent to clients.
363 <!-- .\"Table 8-2 -->
365 lists the event mask constants you can pass to
366 the event_mask argument and
367 the circumstances in which you would want to specify the
372 <!-- .\"Event Mask Definitions -->
373 <informaltable frame='topbot'>
374 <?dbfo keep-together="auto" ?>
375 <tgroup cols='2' align='left' colsep='0' rowsep='0'>
376 <colspec colname='c1' colwidth='1.0*'/>
377 <colspec colname='c2' colwidth='2.5*'/>
380 <entry>Event Mask</entry>
381 <entry>Circumstances</entry>
386 <entry><symbol>NoEventMask</symbol></entry>
387 <entry>No events wanted</entry>
390 <entry><symbol>KeyPressMask</symbol></entry>
391 <entry>Keyboard down events wanted</entry>
394 <entry><symbol>KeyReleaseMask</symbol></entry>
395 <entry>Keyboard up events wanted</entry>
398 <entry><symbol>ButtonPressMask</symbol></entry>
399 <entry>Pointer button down events wanted</entry>
402 <entry><symbol>ButtonReleaseMask</symbol></entry>
403 <entry>Pointer button up events wanted</entry>
406 <entry><symbol>EnterWindowMask</symbol></entry>
407 <entry>Pointer window entry events wanted</entry>
410 <entry><symbol>LeaveWindowMask</symbol></entry>
411 <entry>Pointer window leave events wanted</entry>
414 <entry><symbol>PointerMotionMask</symbol></entry>
415 <entry>Pointer motion events wanted</entry>
418 <entry><symbol>PointerMotionHintMask</symbol></entry>
419 <entry>Pointer motion hints wanted</entry>
422 <entry><symbol>Button1MotionMask</symbol></entry>
423 <entry>Pointer motion while button 1 down</entry>
426 <entry><symbol>Button2MotionMask</symbol></entry>
427 <entry>Pointer motion while button 2 down</entry>
430 <entry><symbol>Button3MotionMask</symbol></entry>
431 <entry>Pointer motion while button 3 down</entry>
434 <entry><symbol>Button4MotionMask</symbol></entry>
435 <entry>Pointer motion while button 4 down</entry>
438 <entry><symbol>Button5MotionMask</symbol></entry>
439 <entry>Pointer motion while button 5 down</entry>
442 <entry><symbol>ButtonMotionMask</symbol></entry>
443 <entry>Pointer motion while any button down</entry>
446 <entry><symbol>KeymapStateMask</symbol></entry>
447 <entry>Keyboard state wanted at window entry and focus in</entry>
450 <entry><symbol>ExposureMask</symbol></entry>
451 <entry>Any exposure wanted</entry>
454 <entry><symbol>VisibilityChangeMask</symbol></entry>
455 <entry>Any change in visibility wanted</entry>
458 <entry><symbol>StructureNotifyMask</symbol></entry>
459 <entry>Any change in window structure wanted</entry>
462 <entry><symbol>ResizeRedirectMask</symbol></entry>
463 <entry>Redirect resize of this window</entry>
466 <entry><symbol>SubstructureNotifyMask</symbol></entry>
467 <entry>Substructure notification wanted</entry>
470 <entry><symbol>SubstructureRedirectMask</symbol></entry>
471 <entry>Redirect structure requests on children</entry>
474 <entry><symbol>FocusChangeMask</symbol></entry>
475 <entry>Any change in input focus wanted</entry>
478 <entry><symbol>PropertyChangeMask</symbol></entry>
479 <entry>Any change in property wanted</entry>
482 <entry><symbol>ColormapChangeMask</symbol></entry>
483 <entry>Any change in colormap wanted</entry>
486 <entry><symbol>OwnerGrabButtonMask</symbol></entry>
487 <entry>Automatic grabs should activate with owner_events set to True</entry>
497 <sect1 id="Event_Processing_Overview">
498 <title>Event Processing Overview</title>
500 <!-- (SN Event Processing Overview -->
504 The event reported to a client application during event processing
505 depends on which event masks you provide as the event-mask attribute
507 For some event masks, there is a one-to-one correspondence between
508 the event mask constant and the event type constant.
509 For example, if you pass the event mask
510 <symbol>ButtonPressMask</symbol>,
511 the X server sends back only
512 <symbol>ButtonPress</symbol>
514 <indexterm><primary>CurrentTime</primary></indexterm>
515 Most events contain a time member,
516 which is the time at which an event occurred.
520 In other cases, one event mask constant can map to several event type constants.
521 For example, if you pass the event mask
522 <symbol>SubstructureNotifyMask</symbol>,
523 the X server can send back
524 <symbol>CirculateNotify</symbol>,
525 <symbol>ConfigureNotify</symbol>,
526 <symbol>CreateNotify</symbol>,
527 <symbol>DestroyNotify</symbol>,
528 <symbol>GravityNotify</symbol>,
529 <symbol>MapNotify</symbol>,
530 <symbol>ReparentNotify</symbol>,
532 <symbol>UnmapNotify</symbol>
538 two event masks can map to one event type.
541 <symbol>PointerMotionMask</symbol>
543 <symbol>ButtonMotionMask</symbol>,
544 the X server sends back
546 <symbol>MotionNotify</symbol>
552 lists the event mask,
553 its associated event type or types,
554 and the structure name associated with the event type.
555 Some of these structures actually are typedefs to a generic structure
556 that is shared between two event types.
557 Note that N.A. appears in columns for which the information is not applicable.
562 <informaltable frame='topbot'>
563 <?dbfo keep-together="auto" ?>
564 <tgroup cols='4' align='left' colsep='0' rowsep='0'>
565 <colspec colname='c1' colwidth='1.2*'/>
566 <colspec colname='c2' colwidth='1.0*'/>
567 <colspec colname='c3' colwidth='1.2*'/>
568 <colspec colname='c4' colwidth='1.0*'/>
571 <entry>Event Mask</entry>
572 <entry>Event Type</entry>
573 <entry>Structure</entry>
574 <entry>Generic Structure</entry>
580 <para>ButtonMotionMask</para>
581 <para>Button1MotionMask</para>
582 <para>Button2MotionMask</para>
583 <para>Button3MotionMask</para>
584 <para>Button4MotionMask</para>
585 <para>Button5MotionMask</para>
587 <entry>MotionNotify</entry>
588 <entry>XPointerMovedEvent</entry>
589 <entry>XMotionEvent</entry>
592 <entry>ButtonPressMask</entry>
593 <entry>ButtonPress</entry>
594 <entry>XButtonPressedEvent</entry>
595 <entry>XButtonEvent</entry>
598 <entry>ButtonReleaseMask</entry>
599 <entry>ButtonRelease</entry>
600 <entry>XButtonReleasedEvent</entry>
601 <entry>XButtonEvent</entry>
604 <entry>ColormapChangeMask</entry>
605 <entry>ColormapNotify</entry>
606 <entry>XColormapEvent</entry>
609 <entry>EnterWindowMask</entry>
610 <entry>EnterNotify</entry>
611 <entry>XEnterWindowEvent</entry>
612 <entry>XCrossingEvent</entry>
615 <entry>LeaveWindowMask</entry>
616 <entry>LeaveNotify</entry>
617 <entry>XLeaveWindowEvent</entry>
618 <entry>XCrossingEvent</entry>
621 <entry>ExposureMask</entry>
622 <entry>Expose</entry>
623 <entry>XExposeEvent </entry>
626 <entry morerows='1'>GCGraphicsExposures in GC</entry>
627 <entry>GraphicsExpose</entry>
628 <entry>XGraphicsExposeEvent</entry>
631 <entry>NoExpose</entry>
632 <entry>XNoExposeEvent</entry>
635 <entry morerows='1'>FocusChangeMask</entry>
636 <entry>FocusIn</entry>
637 <entry>XFocusInEvent</entry>
638 <entry>XFocusChangeEvent</entry>
641 <entry>FocusOut</entry>
642 <entry>XFocusOutEvent</entry>
643 <entry>XFocusChangeEvent</entry>
646 <entry>KeymapStateMask</entry>
647 <entry>KeymapNotify</entry>
648 <entry>XKeymapEvent</entry>
651 <entry>KeyPressMask</entry>
652 <entry>KeyPress</entry>
653 <entry>XKeyPressedEvent</entry>
654 <entry>XKeyEvent</entry>
657 <entry>KeyReleaseMask</entry>
658 <entry>KeyRelease</entry>
659 <entry>XKeyReleasedEvent</entry>
660 <entry>XKeyEvent</entry>
663 <entry>OwnerGrabButtonMask</entry>
668 <entry>PointerMotionMask</entry>
669 <entry>MotionNotify</entry>
670 <entry>XPointerMovedEvent</entry>
671 <entry>XMotionEvent</entry>
674 <entry>PointerMotionHintMask</entry>
679 <entry>PropertyChangeMask</entry>
680 <entry>PropertyNotify</entry>
681 <entry>XPropertyEvent</entry>
684 <entry>ResizeRedirectMask</entry>
685 <entry>ResizeRequest</entry>
686 <entry>XResizeRequestEvent</entry>
689 <entry morerows='6'>StructureNotifyMask</entry>
690 <entry>CirculateNotify</entry>
691 <entry>XCirculateEvent</entry>
694 <entry>ConfigureNotify</entry>
695 <entry>XConfigureEvent</entry>
698 <entry>DestroyNotify</entry>
699 <entry>XDestroyWindowEvent</entry>
702 <entry>GravityNotify</entry>
703 <entry>XGravityEvent</entry>
706 <entry>MapNotify</entry>
707 <entry>XMapEvent</entry>
710 <entry>ReparentNotify</entry>
711 <entry>XReparentEvent</entry>
714 <entry>UnmapNotify</entry>
715 <entry>XUnmapEvent</entry>
718 <entry morerows='7'>SubstructureNotifyMask</entry>
719 <entry>CirculateNotify</entry>
720 <entry>XCirculateEvent</entry>
723 <entry>ConfigureNotify</entry>
724 <entry>XConfigureEvent</entry>
727 <entry>CreateNotify</entry>
728 <entry>XCreateWindowEvent</entry>
731 <entry>DestroyNotify</entry>
732 <entry>XDestroyWindowEvent</entry>
735 <entry>GravityNotify</entry>
736 <entry>XGravityEvent</entry>
739 <entry>MapNotify</entry>
740 <entry>XMapEvent</entry>
743 <entry>ReparentNotify</entry>
744 <entry>XReparentEvent</entry>
747 <entry>UnmapNotify</entry>
748 <entry>XUnmapEvent</entry>
751 <entry morerows='2'>SubstructureRedirectMask</entry>
752 <entry>CirculateRequest</entry>
753 <entry>XCirculateRequestEvent</entry>
756 <entry>ConfigureRequest</entry>
757 <entry>XConfigureRequestEvent</entry>
760 <entry>MapRequest</entry>
761 <entry>XMapRequestEvent</entry>
765 <entry>ClientMessage</entry>
766 <entry>XClientMessageEvent</entry>
770 <entry>MappingNotify</entry>
771 <entry>XMappingEvent</entry>
775 <entry>SelectionClear</entry>
776 <entry>XSelectionClearEvent</entry>
780 <entry>SelectionNotify</entry>
781 <entry>XSelectionEvent</entry>
785 <entry>SelectionRequest</entry>
786 <entry>XSelectionRequestEvent</entry>
789 <entry>VisibilityChangeMask</entry>
790 <entry>VisibilityNotify</entry>
791 <entry>XVisibilityEvent</entry>
799 The sections that follow describe the processing that occurs
800 when you select the different event masks.
801 The sections are organized according to these processing categories:
806 Keyboard and pointer events
811 Window crossing events
821 Keymap state notification events
831 Window state notification events
836 Structure control events
841 Colormap state notification events
846 Client communication events
853 <sect1 id="Keyboard_and_Pointer_Events">
854 <title>Keyboard and Pointer Events</title>
856 <!-- (SN Keyboard and Pointer Events -->
860 This section discusses:
865 Pointer button events
870 Keyboard and pointer events
874 <sect2 id="Pointer_Button_Events">
875 <title>Pointer Button Events</title>
877 <!-- (SN Pointer Button Events -->
881 The following describes the event processing that occurs when a pointer button
882 press is processed with the pointer in some window w and
883 when no active pointer grab is in progress.
887 The X server searches the ancestors of w from the root down,
888 looking for a passive grab to activate.
889 If no matching passive grab on the button exists,
890 the X server automatically starts an active grab for the client receiving
891 the event and sets the last-pointer-grab time to the current server time.
892 The effect is essentially equivalent to an
893 <xref linkend='XGrabButton' xrefstyle='select: title'/>
894 with these client passed arguments:
896 <informaltable frame='topbot'>
897 <?dbfo keep-together="always" ?>
898 <tgroup cols='2' align='left' colsep='0' rowsep='0'>
899 <colspec colname='c1' colwidth='1.0*'/>
900 <colspec colname='c2' colwidth='4.0*'/>
903 <entry>Argument</entry>
909 <entry><emphasis remap='I'>w</emphasis></entry>
910 <entry>The event window </entry>
913 <entry><emphasis remap='I'>event_mask</emphasis></entry>
914 <entry>The client's selected pointer events on the event window</entry>
917 <entry><emphasis remap='I'>pointer_mode</emphasis></entry>
918 <entry><symbol>GrabModeAsync</symbol></entry>
921 <entry><emphasis remap='I'>keyboard_mode</emphasis></entry>
922 <entry><symbol>GrabModeAsync</symbol></entry>
925 <entry><emphasis remap='I'>owner_events</emphasis></entry>
926 <entry><symbol>True</symbol>,
927 if the client has selected
928 <symbol>OwnerGrabButtonMask</symbol>
931 <symbol>False</symbol></entry>
934 <entry><emphasis remap='I'>confine_to</emphasis></entry>
935 <entry><symbol>None</symbol></entry>
938 <entry><emphasis remap='I'>cursor</emphasis></entry>
939 <entry><symbol>None</symbol></entry>
947 The active grab is automatically terminated when
948 the logical state of the pointer has all buttons released.
949 Clients can modify the active grab by calling
950 <xref linkend='XUngrabPointer' xrefstyle='select: title'/>
952 <xref linkend='XChangeActivePointerGrab' xrefstyle='select: title'/>.
956 <sect2 id="Keyboard_and_Pointer_Events_b">
957 <title>Keyboard and Pointer Events</title>
959 <!-- (SN Keyboard and Pointer Events -->
963 <indexterm><primary>Events</primary><secondary>ButtonPress</secondary></indexterm>
964 <indexterm><primary>Events</primary><secondary>ButtonRelease</secondary></indexterm>
965 <indexterm><primary>Events</primary><secondary>KeyPress</secondary></indexterm>
966 <indexterm><primary>Events</primary><secondary>KeyRelease</secondary></indexterm>
967 <indexterm><primary>Events</primary><secondary>MotionNotify</secondary></indexterm>
968 This section discusses the processing that occurs for the
970 <symbol>KeyPress</symbol>
972 <symbol>KeyRelease</symbol>
973 and the pointer events
974 <symbol>ButtonPress</symbol>,
975 <symbol>ButtonRelease</symbol>,
977 <symbol>MotionNotify</symbol>.
978 For information about the keyboard event-handling utilities,
979 see <link linkend='Event_Handling_Functions'>chapter 11</link>.
983 <indexterm significance="preferred"><primary>KeyPress</primary></indexterm>
984 <indexterm significance="preferred"><primary>KeyRelease</primary></indexterm>
986 <symbol>KeyPress</symbol>
988 <symbol>KeyRelease</symbol>
989 events to clients wanting information about keys that logically change state.
990 Note that these events are generated for all keys,
991 even those mapped to modifier bits.
992 <indexterm significance="preferred"><primary>ButtonPress</primary></indexterm>
993 <indexterm significance="preferred"><primary>ButtonRelease</primary></indexterm>
995 <symbol>ButtonPress</symbol>
997 <symbol>ButtonRelease</symbol>
998 events to clients wanting information about buttons that logically change state.
1002 <indexterm significance="preferred"><primary>MotionNotify</primary></indexterm>
1003 The X server reports
1004 <symbol>MotionNotify</symbol>
1005 events to clients wanting information about when the pointer logically moves.
1006 The X server generates this event whenever the pointer is moved
1007 and the pointer motion begins and ends in the window.
1009 <symbol>MotionNotify</symbol>
1010 events is not guaranteed,
1011 but a client that selects this event type is guaranteed
1012 to receive at least one event when the pointer moves and then rests.
1016 The generation of the logical changes lags the physical changes
1017 if device event processing is frozen.
1022 <symbol>KeyPress</symbol>,
1023 <symbol>KeyRelease</symbol>,
1024 <symbol>ButtonPress</symbol>,
1026 <symbol>ButtonRelease</symbol>
1028 <symbol>KeyPressMask</symbol>,
1029 <symbol>KeyReleaseMask</symbol>,
1030 <symbol>ButtonPressMask</symbol>,
1032 <symbol>ButtonReleaseMask</symbol>
1033 bits in the event-mask attribute of the window.
1038 <symbol>MotionNotify</symbol>
1039 events, set one or more of the following event
1040 masks bits in the event-mask attribute of the window.
1045 <symbol>Button1MotionMask</symbol> - <symbol>Button5MotionMask</symbol>
1050 The client application receives
1051 <symbol>MotionNotify</symbol>
1052 events only when one or more of the specified buttons is pressed.
1057 <symbol>ButtonMotionMask</symbol>
1062 The client application receives
1063 <symbol>MotionNotify</symbol>
1064 events only when at least one button is pressed.
1069 <symbol>PointerMotionMask</symbol>
1074 The client application receives
1075 <symbol>MotionNotify</symbol>
1076 events independent of the state of
1077 the pointer buttons.
1082 <symbol>PointerMotionHintMask</symbol>
1088 <symbol>PointerMotionHintMask</symbol>
1089 is selected in combination with one or more of the above masks,
1090 the X server is free to send only one
1091 <symbol>MotionNotify</symbol>
1092 event (with the is_hint member of the
1093 <type>XPointerMovedEvent</type>
1095 <symbol>NotifyHint</symbol>)
1096 to the client for the event window,
1097 until either the key or button state changes,
1098 the pointer leaves the event window, or the client calls
1099 <xref linkend='XQueryPointer' xrefstyle='select: title'/>
1101 <xref linkend='XGetMotionEvents' xrefstyle='select: title'/>.
1102 The server still may send
1103 <symbol>MotionNotify</symbol>
1104 events without is_hint set to
1105 <symbol>NotifyHint</symbol>.
1111 The source of the event is the viewable window that the pointer is in.
1112 The window used by the X server to report these events depends on
1113 the window's position in the window hierarchy
1114 and whether any intervening window prohibits the generation of these events.
1115 Starting with the source window,
1116 the X server searches up the window hierarchy until it locates the first
1117 window specified by a client as having an interest in these events.
1118 If one of the intervening windows has its do-not-propagate-mask
1119 set to prohibit generation of the event type,
1120 the events of those types will be suppressed.
1121 Clients can modify the actual window used for reporting by performing
1122 active grabs and, in the case of keyboard events, by using the focus window.
1126 The structures for these event types contain:
1128 <literallayout class="monospaced">
1130 int type; /* ButtonPress or ButtonRelease */
1131 unsigned long serial; /* # of last request processed by server */
1132 Bool send_event; /* true if this came from a SendEvent request */
1133 Display *display; /* Display the event was read from */
1134 Window window; /* ``event'' window it is reported relative to */
1135 Window root; /* root window that the event occurred on */
1136 Window subwindow; /* child window */
1137 Time time; /* milliseconds */
1138 int x, y; /* pointer x, y coordinates in event window */
1139 int x_root, y_root; /* coordinates relative to root */
1140 unsigned int state; /* key or button mask */
1141 unsigned int button; /* detail */
1142 Bool same_screen; /* same screen flag */
1144 typedef XButtonEvent XButtonPressedEvent;
1145 typedef XButtonEvent XButtonReleasedEvent;
1148 <literallayout class="monospaced">
1150 int type; /* KeyPress or KeyRelease */
1151 unsigned long serial; /* # of last request processed by server */
1152 Bool send_event; /* true if this came from a SendEvent request */
1153 Display *display; /* Display the event was read from */
1154 Window window; /* ``event'' window it is reported relative to */
1155 Window root; /* root window that the event occurred on */
1156 Window subwindow; /* child window */
1157 Time time; /* milliseconds */
1158 int x, y; /* pointer x, y coordinates in event window */
1159 int x_root, y_root; /* coordinates relative to root */
1160 unsigned int state; /* key or button mask */
1161 unsigned int keycode; /* detail */
1162 Bool same_screen; /* same screen flag */
1164 typedef XKeyEvent XKeyPressedEvent;
1165 typedef XKeyEvent XKeyReleasedEvent;
1168 <literallayout class="monospaced">
1170 int type; /* MotionNotify */
1171 unsigned long serial; /* # of last request processed by server */
1172 Bool send_event; /* true if this came from a SendEvent request */
1173 Display *display; /* Display the event was read from */
1174 Window window; /* ``event'' window reported relative to */
1175 Window root; /* root window that the event occurred on */
1176 Window subwindow; /* child window */
1177 Time time; /* milliseconds */
1178 int x, y; /* pointer x, y coordinates in event window */
1179 int x_root, y_root; /* coordinates relative to root */
1180 unsigned int state; /* key or button mask */
1181 char is_hint; /* detail */
1182 Bool same_screen; /* same screen flag */
1184 typedef XMotionEvent XPointerMovedEvent;
1188 These structures have the following common members:
1189 window, root, subwindow, time, x, y, x_root, y_root, state, and same_screen.
1190 The window member is set to the window on which the
1191 event was generated and is referred to as the event window.
1192 As long as the conditions previously discussed are met,
1193 this is the window used by the X server to report the event.
1194 The root member is set to the source window's root window.
1195 The x_root and y_root members are set to the pointer's coordinates
1196 relative to the root window's origin at the time of the event.
1201 The same_screen member is set to indicate whether the event
1202 window is on the same screen
1203 as the root window and can be either
1204 <symbol>True</symbol>
1206 <symbol>False</symbol>.
1208 <symbol>True</symbol>,
1209 the event and root windows are on the same screen.
1211 <symbol>False</symbol>,
1212 the event and root windows are not on the same screen.
1216 If the source window is an inferior of the event window,
1217 the subwindow member of the structure is set to the child of the event window
1218 that is the source window or the child of the event window that is
1219 an ancestor of the source window.
1220 Otherwise, the X server sets the subwindow member to
1221 <symbol>None</symbol>.
1222 The time member is set to the time when the event was generated
1223 and is expressed in milliseconds.
1227 If the event window is on the same screen as the root window,
1229 are set to the coordinates relative to the event window's origin.
1230 Otherwise, these members are set to zero.
1234 The state member is set to indicate the logical state of the pointer buttons
1235 and modifier keys just prior to the event,
1236 which is the bitwise inclusive OR of one or more of the
1237 button or modifier key masks:
1238 <symbol>Button1Mask</symbol>,
1239 <symbol>Button2Mask</symbol>,
1240 <symbol>Button3Mask</symbol>,
1241 <symbol>Button4Mask</symbol>,
1242 <symbol>Button5Mask</symbol>,
1243 <symbol>ShiftMask</symbol>,
1244 <symbol>LockMask</symbol>,
1245 <symbol>ControlMask</symbol>,
1246 <symbol>Mod1Mask</symbol>,
1247 <symbol>Mod2Mask</symbol>,
1248 <symbol>Mod3Mask</symbol>,
1249 <symbol>Mod4Mask</symbol>,
1251 <symbol>Mod5Mask</symbol>.
1255 Each of these structures also has a member that indicates the detail.
1257 <type>XKeyPressedEvent</type>
1259 <type>XKeyReleasedEvent</type>
1260 structures, this member is called a keycode.
1261 It is set to a number that represents a physical key on the keyboard.
1262 The keycode is an arbitrary representation for any key on the keyboard
1263 (see sections <link linkend="Manipulating_the_Keyboard_Encoding">12.7</link>
1264 and <link linkend="Using_Keyboard_Utility_Functions">16.1</link>).
1269 <type>XButtonPressedEvent</type>
1271 <type>XButtonReleasedEvent</type>
1272 structures, this member is called button.
1273 It represents the pointer button that changed state and can be the
1274 <symbol>Button1</symbol>,
1275 <symbol>Button2</symbol>,
1276 <symbol>Button3</symbol>,
1277 <symbol>Button4</symbol>,
1279 <symbol>Button5</symbol>
1282 <type>XPointerMovedEvent</type>
1283 structure, this member is called is_hint.
1285 <symbol>NotifyNormal</symbol>
1287 <symbol>NotifyHint</symbol>.
1291 Some of the symbols mentioned in this section have fixed values, as
1294 <informaltable frame='topbot'>
1295 <?dbfo keep-together="always" ?>
1296 <tgroup cols='2' align='left' colsep='0' rowsep='0'>
1297 <colspec colname='c1' colwidth='1.0*'/>
1298 <colspec colname='c2' colwidth='3.0*'/>
1301 <entry>Symbol</entry>
1302 <entry>Value</entry>
1307 <entry><symbol>Button1MotionMask</symbol></entry>
1308 <entry>(1L<<8)</entry>
1311 <entry><symbol>Button2MotionMask</symbol></entry>
1312 <entry>(1L<<9)</entry>
1315 <entry><symbol>Button3MotionMask</symbol></entry>
1316 <entry>(1L<<10)</entry>
1319 <entry><symbol>Button4MotionMask</symbol></entry>
1320 <entry>(1L<<11)</entry>
1323 <entry><symbol>Button5MotionMask</symbol></entry>
1324 <entry>(1L<<12)</entry>
1327 <entry><symbol>Button1Mask</symbol></entry>
1328 <entry>(1<<8)</entry>
1331 <entry><symbol>Button2Mask</symbol></entry>
1332 <entry>(1<<9)</entry>
1335 <entry><symbol>Button3Mask</symbol></entry>
1336 <entry>(1<<10)</entry>
1339 <entry><symbol>Button4Mask</symbol></entry>
1340 <entry>(1<<11)</entry>
1343 <entry><symbol>Button5Mask</symbol></entry>
1344 <entry>(1<<12)</entry>
1347 <entry><symbol>ShiftMask</symbol></entry>
1348 <entry>(1<<0)</entry>
1351 <entry><symbol>LockMask</symbol></entry>
1352 <entry>(1<<1)</entry>
1355 <entry><symbol>ControlMask</symbol></entry>
1356 <entry>(1<<2)</entry>
1359 <entry><symbol>Mod1Mask</symbol></entry>
1360 <entry>(1<<3)</entry>
1363 <entry><symbol>Mod2Mask</symbol></entry>
1364 <entry>(1<<4)</entry>
1367 <entry><symbol>Mod3Mask</symbol></entry>
1368 <entry>(1<<5)</entry>
1371 <entry><symbol>Mod4Mask</symbol></entry>
1372 <entry>(1<<6)</entry>
1375 <entry><symbol>Mod5Mask</symbol></entry>
1376 <entry>(1<<7)</entry>
1379 <entry><symbol>Button1</symbol></entry>
1383 <entry><symbol>Button2</symbol></entry>
1387 <entry><symbol>Button3</symbol></entry>
1391 <entry><symbol>Button4</symbol></entry>
1395 <entry><symbol>Button5</symbol></entry>
1404 <sect1 id='Window_EntryExit_Events'>
1405 <title>Window Entry/Exit Events</title>
1407 <!-- (SN Window Entry/Exit Events -->
1411 <indexterm><primary>Events</primary><secondary>EnterNotify</secondary></indexterm>
1412 <indexterm><primary>Events</primary><secondary>LeaveNotify</secondary></indexterm>
1413 This section describes the processing that
1414 occurs for the window crossing events
1415 <symbol>EnterNotify</symbol>
1417 <symbol>LeaveNotify</symbol>.
1418 <indexterm significance="preferred"><primary>EnterNotify</primary></indexterm>
1419 <indexterm significance="preferred"><primary>LeaveNotify</primary></indexterm>
1420 If a pointer motion or a window hierarchy change causes the
1421 pointer to be in a different window than before, the X server reports
1422 <symbol>EnterNotify</symbol>
1424 <symbol>LeaveNotify</symbol>
1425 events to clients who have selected for these events.
1427 <symbol>EnterNotify</symbol>
1429 <symbol>LeaveNotify</symbol>
1430 events caused by a hierarchy change are
1431 generated after any hierarchy event
1432 (<symbol>UnmapNotify</symbol>,
1433 <symbol>MapNotify</symbol>,
1434 <symbol>ConfigureNotify</symbol>,
1435 <symbol>GravityNotify</symbol>,
1436 <symbol>CirculateNotify</symbol>)
1437 caused by that change;
1438 however, the X protocol does not constrain the ordering of
1439 <symbol>EnterNotify</symbol>
1441 <symbol>LeaveNotify</symbol>
1442 events with respect to
1443 <symbol>FocusOut</symbol>,
1444 <symbol>VisibilityNotify</symbol>,
1446 <symbol>Expose</symbol>
1452 <symbol>MotionNotify</symbol>
1453 events, which are also generated when the pointer moves
1454 but only when the pointer motion begins and ends in a single window.
1456 <symbol>EnterNotify</symbol>
1458 <symbol>LeaveNotify</symbol>
1459 event also can be generated when some client application calls
1460 <xref linkend='XGrabPointer' xrefstyle='select: title'/>
1462 <xref linkend='XUngrabPointer' xrefstyle='select: title'/>.
1467 <symbol>EnterNotify</symbol>
1469 <symbol>LeaveNotify</symbol>
1471 <symbol>EnterWindowMask</symbol>
1473 <symbol>LeaveWindowMask</symbol>
1474 bits of the event-mask attribute of the window.
1478 The structure for these event types contains:
1481 <indexterm significance="preferred"><primary>XCrossingEvent</primary></indexterm>
1482 <indexterm significance="preferred"><primary>XEnterWindowEvent</primary></indexterm>
1483 <indexterm significance="preferred"><primary>XLeaveWindowEvent</primary></indexterm>
1485 <literallayout class="monospaced">
1489 int type; /* EnterNotify or LeaveNotify */
1490 unsigned long serial; /* # of last request processed by server */
1491 Bool send_event; /* true if this came from a SendEvent request */
1492 Display *display; /* Display the event was read from */
1493 Window window; /* ``event'' window reported relative to */
1494 Window root; /* root window that the event occurred on */
1495 Window subwindow; /* child window */
1496 Time time; /* milliseconds */
1497 int x, y; /* pointer x, y coordinates in event window */
1498 int x_root, y_root; /* coordinates relative to root */
1499 int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
1502 * NotifyAncestor, NotifyVirtual, NotifyInferior,
1503 * NotifyNonlinear,NotifyNonlinearVirtual
1505 Bool same_screen; /* same screen flag */
1506 Bool focus; /* boolean focus */
1507 unsigned int state; /* key or button mask */
1509 typedef XCrossingEvent XEnterWindowEvent;
1510 typedef XCrossingEvent XLeaveWindowEvent;
1516 The window member is set to the window on which the
1517 <symbol>EnterNotify</symbol>
1519 <symbol>LeaveNotify</symbol>
1520 event was generated and is referred to as the event window.
1521 This is the window used by the X server to report the event,
1522 and is relative to the root
1523 window on which the event occurred.
1524 The root member is set to the root window of the screen
1525 on which the event occurred.
1530 <symbol>LeaveNotify</symbol>
1532 if a child of the event window contains the initial position of the pointer,
1533 the subwindow component is set to that child.
1534 Otherwise, the X server sets the subwindow member to
1535 <symbol>None</symbol>.
1537 <symbol>EnterNotify</symbol>
1538 event, if a child of the event window contains the final pointer position,
1539 the subwindow component is set to that child or
1540 <symbol>None</symbol>.
1544 The time member is set to the time when the event was generated
1545 and is expressed in milliseconds.
1546 The x and y members are set to the coordinates of the pointer position in
1548 This position is always the pointer's final position,
1549 not its initial position.
1550 If the event window is on the same
1551 screen as the root window, x and y are the pointer coordinates
1552 relative to the event window's origin.
1553 Otherwise, x and y are set to zero.
1554 The x_root and y_root members are set to the pointer's coordinates relative to the
1555 root window's origin at the time of the event.
1559 The same_screen member is set to indicate whether the event window is on the same screen
1560 as the root window and can be either
1561 <symbol>True</symbol>
1563 <symbol>False</symbol>.
1565 <symbol>True</symbol>,
1566 the event and root windows are on the same screen.
1568 <symbol>False</symbol>,
1569 the event and root windows are not on the same screen.
1573 The focus member is set to indicate whether the event window is the focus window or an
1574 inferior of the focus window.
1575 The X server can set this member to either
1576 <symbol>True</symbol>
1578 <symbol>False</symbol>.
1580 <symbol>True</symbol>,
1581 the event window is the focus window or an inferior of the focus window.
1583 <symbol>False</symbol>,
1584 the event window is not the focus window or an inferior of the focus window.
1588 The state member is set to indicate the state of the pointer buttons and
1589 modifier keys just prior to the
1591 The X server can set this member to the bitwise inclusive OR of one
1592 or more of the button or modifier key masks:
1593 <symbol>Button1Mask</symbol>,
1594 <symbol>Button2Mask</symbol>,
1595 <symbol>Button3Mask</symbol>,
1596 <symbol>Button4Mask</symbol>,
1597 <symbol>Button5Mask</symbol>,
1598 <symbol>ShiftMask</symbol>,
1599 <symbol>LockMask</symbol>,
1600 <symbol>ControlMask</symbol>,
1601 <symbol>Mod1Mask</symbol>,
1602 <symbol>Mod2Mask</symbol>,
1603 <symbol>Mod3Mask</symbol>,
1604 <symbol>Mod4Mask</symbol>,
1605 <symbol>Mod5Mask</symbol>.
1609 The mode member is set to indicate whether the events are normal events,
1610 pseudo-motion events
1611 when a grab activates, or pseudo-motion events when a grab deactivates.
1612 The X server can set this member to
1613 <symbol>NotifyNormal</symbol>,
1614 <symbol>NotifyGrab</symbol>,
1616 <symbol>NotifyUngrab</symbol>.
1620 The detail member is set to indicate the notify detail and can be
1621 <symbol>NotifyAncestor</symbol>,
1622 <symbol>NotifyVirtual</symbol>,
1623 <symbol>NotifyInferior</symbol>,
1624 <symbol>NotifyNonlinear</symbol>,
1626 <symbol>NotifyNonlinearVirtual</symbol>.
1628 <sect2 id='Normal_EntryExit_Events'>
1629 <title>Normal Entry/Exit Events</title>
1631 <!-- (SN Normal Entry/Exit Events -->
1635 <symbol>EnterNotify</symbol>
1637 <symbol>LeaveNotify</symbol>
1638 events are generated when the pointer moves from
1639 one window to another window.
1640 Normal events are identified by
1641 <type>XEnterWindowEvent</type>
1643 <type>XLeaveWindowEvent</type>
1644 structures whose mode member is set to
1645 <symbol>NotifyNormal</symbol>.
1650 When the pointer moves from window A to window B and A is an inferior of B,
1651 the X server does the following:
1658 <symbol>LeaveNotify</symbol>
1659 event on window A, with the detail member of the
1660 <type>XLeaveWindowEvent</type>
1662 <symbol>NotifyAncestor</symbol>.
1668 <symbol>LeaveNotify</symbol>
1669 event on each window between window A and window B, exclusive,
1670 with the detail member of each
1671 <type>XLeaveWindowEvent</type>
1673 <symbol>NotifyVirtual</symbol>.
1679 <symbol>EnterNotify</symbol>
1680 event on window B, with the detail member of the
1681 <type>XEnterWindowEvent</type>
1683 <symbol>NotifyInferior</symbol>.
1689 When the pointer moves from window A to window B and B is an inferior of A,
1690 the X server does the following:
1697 <symbol>LeaveNotify</symbol>
1699 with the detail member of the
1700 <type>XLeaveWindowEvent</type>
1702 <symbol>NotifyInferior</symbol>.
1708 <symbol>EnterNotify</symbol>
1709 event on each window between window A and window B, exclusive, with the
1710 detail member of each
1711 <type>XEnterWindowEvent</type>
1713 <symbol>NotifyVirtual</symbol>.
1719 <symbol>EnterNotify</symbol>
1720 event on window B, with the detail member of the
1721 <type>XEnterWindowEvent</type>
1723 <symbol>NotifyAncestor</symbol>.
1729 When the pointer moves from window A to window B
1730 and window C is their least common ancestor,
1731 the X server does the following:
1738 <symbol>LeaveNotify</symbol>
1740 with the detail member of the
1741 <type>XLeaveWindowEvent</type>
1743 <symbol>NotifyNonlinear</symbol>.
1749 <symbol>LeaveNotify</symbol>
1750 event on each window between window A and window C, exclusive,
1751 with the detail member of each
1752 <type>XLeaveWindowEvent</type>
1754 <symbol>NotifyNonlinearVirtual</symbol>.
1760 <symbol>EnterNotify</symbol>
1761 event on each window between window C and window B, exclusive,
1762 with the detail member of each
1763 <type>XEnterWindowEvent</type>
1765 <symbol>NotifyNonlinearVirtual</symbol>.
1771 <symbol>EnterNotify</symbol>
1772 event on window B, with the detail member of the
1773 <type>XEnterWindowEvent</type>
1775 <symbol>NotifyNonlinear</symbol>.
1781 When the pointer moves from window A to window B on different screens,
1782 the X server does the following:
1789 <symbol>LeaveNotify</symbol>
1791 with the detail member of the
1792 <type>XLeaveWindowEvent</type>
1794 <symbol>NotifyNonlinear</symbol>.
1799 If window A is not a root window,
1801 <symbol>LeaveNotify</symbol>
1802 event on each window above window A up to and including its root,
1803 with the detail member of each
1804 <type>XLeaveWindowEvent</type>
1806 <symbol>NotifyNonlinearVirtual</symbol>.
1811 If window B is not a root window,
1813 <symbol>EnterNotify</symbol>
1814 event on each window from window B's root down to but not including
1815 window B, with the detail member of each
1816 <type>XEnterWindowEvent</type>
1818 <symbol>NotifyNonlinearVirtual</symbol>.
1824 <symbol>EnterNotify</symbol>
1825 event on window B, with the detail member of the
1826 <type>XEnterWindowEvent</type>
1828 <symbol>NotifyNonlinear</symbol>.
1835 <sect2 id='Grab_and_Ungrab_EntryExit_Events'>
1836 <title>Grab and Ungrab Entry/Exit Events</title>
1838 <!-- (SN Grab and Ungrab Entry/Exit Events -->
1843 <symbol>EnterNotify</symbol>
1845 <symbol>LeaveNotify</symbol>
1846 events are generated when a pointer grab activates or deactivates.
1847 Events in which the pointer grab activates
1849 <type>XEnterWindowEvent</type>
1851 <type>XLeaveWindowEvent</type>
1852 structures whose mode member is set to
1853 <symbol>NotifyGrab</symbol>.
1854 Events in which the pointer grab deactivates
1856 <type>XEnterWindowEvent</type>
1858 <type>XLeaveWindowEvent</type>
1859 structures whose mode member is set to
1860 <symbol>NotifyUngrab</symbol>
1862 <xref linkend='XGrabPointer' xrefstyle='select: title'/>).
1867 When a pointer grab activates after any initial warp into a confine_to
1868 window and before generating any actual
1869 <symbol>ButtonPress</symbol>
1870 event that activates the grab,
1871 G is the grab_window for the grab,
1872 and P is the window the pointer is in,
1873 the X server does the following:
1880 <symbol>EnterNotify</symbol>
1882 <symbol>LeaveNotify</symbol>
1883 events (see <link linkend='Normal_EntryExit_Events'>section 10.6.1</link>)
1884 with the mode members of the
1885 <type>XEnterWindowEvent</type>
1887 <type>XLeaveWindowEvent</type>
1889 <symbol>NotifyGrab</symbol>.
1890 These events are generated
1891 as if the pointer were to suddenly warp from
1892 its current position in P to some position in G.
1893 However, the pointer does not warp, and the X server uses the pointer position
1894 as both the initial and final positions for the events.
1900 When a pointer grab deactivates after generating any actual
1901 <symbol>ButtonRelease</symbol>
1902 event that deactivates the grab,
1903 G is the grab_window for the grab,
1904 and P is the window the pointer is in,
1905 the X server does the following:
1912 <symbol>EnterNotify</symbol>
1914 <symbol>LeaveNotify</symbol>
1915 events (see <link linkend='Normal_EntryExit_Events'>section 10.6.1</link>)
1916 with the mode members of the
1917 <type>XEnterWindowEvent</type>
1919 <type>XLeaveWindowEvent</type>
1921 <symbol>NotifyUngrab</symbol>.
1922 These events are generated as if the pointer were to suddenly warp from
1923 some position in G to its current position in P.
1924 However, the pointer does not warp, and the X server uses the
1925 current pointer position as both the
1926 initial and final positions for the events.
1933 <sect1 id="Input_Focus_Events">
1934 <title>Input Focus Events</title>
1936 <!-- (SN Input Focus Events -->
1940 <indexterm><primary>Events</primary><secondary>FocusIn</secondary></indexterm>
1941 <indexterm><primary>Events</primary><secondary>FocusOut</secondary></indexterm>
1942 This section describes the processing that occurs for the input focus events
1943 <symbol>FocusIn</symbol>
1945 <symbol>FocusOut</symbol>.
1946 <indexterm significance="preferred"><primary>FocusIn</primary></indexterm>
1947 <indexterm significance="preferred"><primary>FocusOut</primary></indexterm>
1948 The X server can report
1949 <symbol>FocusIn</symbol>
1951 <symbol>FocusOut</symbol>
1952 events to clients wanting information about when the input focus changes.
1953 The keyboard is always attached to some window
1954 (typically, the root window or a top-level window),
1955 which is called the focus window.
1956 The focus window and the position of the pointer determine the window that
1957 receives keyboard input.
1958 Clients may need to know when the input focus changes
1959 to control highlighting of areas on the screen.
1964 <symbol>FocusIn</symbol>
1966 <symbol>FocusOut</symbol>
1968 <symbol>FocusChangeMask</symbol>
1969 bit in the event-mask attribute of the window.
1973 The structure for these event types contains:
1976 <indexterm significance="preferred"><primary>XFocusChangeEvent</primary></indexterm>
1977 <indexterm significance="preferred"><primary>XFocusInEvent</primary></indexterm>
1978 <indexterm significance="preferred"><primary>XFocusOutEvent</primary></indexterm>
1980 <literallayout class="monospaced">
1984 int type; /* FocusIn or FocusOut */
1985 unsigned long serial; /* # of last request processed by server */
1986 Bool send_event; /* true if this came from a SendEvent request */
1987 Display *display; /* Display the event was read from */
1988 Window window; /* window of event */
1989 int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
1992 * NotifyAncestor, NotifyVirtual, NotifyInferior,
1993 * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
1994 * NotifyPointerRoot, NotifyDetailNone
1996 } XFocusChangeEvent;
1997 typedef XFocusChangeEvent XFocusInEvent;
1998 typedef XFocusChangeEvent XFocusOutEvent;
2003 The window member is set to the window on which the
2004 <symbol>FocusIn</symbol>
2006 <symbol>FocusOut</symbol>
2007 event was generated.
2008 This is the window used by the X server to report the event.
2009 The mode member is set to indicate whether the focus events
2010 are normal focus events,
2011 focus events while grabbed,
2013 when a grab activates, or focus events when a grab deactivates.
2014 The X server can set the mode member to
2015 <symbol>NotifyNormal</symbol>,
2016 <symbol>NotifyWhileGrabbed</symbol>,
2017 <symbol>NotifyGrab</symbol>,
2019 <symbol>NotifyUngrab</symbol>.
2024 <symbol>FocusOut</symbol>
2025 events caused by a window unmap are generated after any
2026 <symbol>UnmapNotify</symbol>
2027 event; however, the X protocol does not constrain the ordering of
2028 <symbol>FocusOut</symbol>
2029 events with respect to
2031 <symbol>EnterNotify</symbol>,
2032 <symbol>LeaveNotify</symbol>,
2033 <symbol>VisibilityNotify</symbol>,
2035 <symbol>Expose</symbol>
2040 Depending on the event mode,
2041 the detail member is set to indicate the notify detail and can be
2042 <symbol>NotifyAncestor</symbol>,
2043 <symbol>NotifyVirtual</symbol>,
2044 <symbol>NotifyInferior</symbol>,
2045 <symbol>NotifyNonlinear</symbol>,
2046 <symbol>NotifyNonlinearVirtual</symbol>,
2047 <symbol>NotifyPointer</symbol>,
2048 <symbol>NotifyPointerRoot</symbol>,
2050 <symbol>NotifyDetailNone</symbol>.
2052 <sect2 id='Normal_Focus_Events_and_Focus_Events_While_Grabbed'>
2053 <title>Normal Focus Events and Focus Events While Grabbed</title>
2055 <!-- (SN Normal Focus Events and Focus Events While Grabbed -->
2059 Normal focus events are identified by
2060 <type>XFocusInEvent</type>
2062 <type>XFocusOutEvent</type>
2063 structures whose mode member is set to
2064 <symbol>NotifyNormal</symbol>.
2065 Focus events while grabbed are identified by
2066 <type>XFocusInEvent</type>
2068 <type>XFocusOutEvent</type>
2069 structures whose mode member is set to
2070 <symbol>NotifyWhileGrabbed</symbol>.
2071 The X server processes normal focus and focus events while grabbed according to
2077 When the focus moves from window A to window B, A is an inferior of B,
2078 and the pointer is in window P,
2079 the X server does the following:
2086 <symbol>FocusOut</symbol>
2087 event on window A, with the detail member of the
2088 <type>XFocusOutEvent</type>
2090 <symbol>NotifyAncestor</symbol>.
2096 <symbol>FocusOut</symbol>
2097 event on each window between window A and window B, exclusive,
2098 with the detail member of each
2099 <type>XFocusOutEvent</type>
2101 <symbol>NotifyVirtual</symbol>.
2107 <symbol>FocusIn</symbol>
2108 event on window B, with the detail member of the
2109 <type>XFocusOutEvent</type>
2111 <symbol>NotifyInferior</symbol>.
2116 If window P is an inferior of window B
2117 but window P is not window A or an inferior or ancestor of window A,
2119 <symbol>FocusIn</symbol>
2120 event on each window below window B, down to and including window P,
2121 with the detail member of each
2122 <type>XFocusInEvent</type>
2124 <symbol>NotifyPointer</symbol>.
2130 When the focus moves from window A to window B, B is an inferior of A,
2131 and the pointer is in window P,
2132 the X server does the following:
2138 If window P is an inferior of window A
2139 but P is not an inferior of window B or an ancestor of B,
2141 <symbol>FocusOut</symbol>
2142 event on each window from window P up to but not including window A,
2143 with the detail member of each
2144 <type>XFocusOutEvent</type>
2146 <symbol>NotifyPointer</symbol>.
2152 <symbol>FocusOut</symbol>
2154 with the detail member of the
2155 <type>XFocusOutEvent</type>
2157 <symbol>NotifyInferior</symbol>.
2163 <symbol>FocusIn</symbol>
2164 event on each window between window A and window B, exclusive, with the
2165 detail member of each
2166 <type>XFocusInEvent</type>
2168 <symbol>NotifyVirtual</symbol>.
2174 <symbol>FocusIn</symbol>
2175 event on window B, with the detail member of the
2176 <type>XFocusInEvent</type>
2178 <symbol>NotifyAncestor</symbol>.
2184 When the focus moves from window A to window B,
2185 window C is their least common ancestor,
2186 and the pointer is in window P,
2187 the X server does the following:
2193 If window P is an inferior of window A,
2195 <symbol>FocusOut</symbol>
2196 event on each window from window P up to but not including window A,
2197 with the detail member of the
2198 <type>XFocusOutEvent</type>
2200 <symbol>NotifyPointer</symbol>.
2206 <symbol>FocusOut</symbol>
2208 with the detail member of the
2209 <type>XFocusOutEvent</type>
2211 <symbol>NotifyNonlinear</symbol>.
2217 <symbol>FocusOut</symbol>
2218 event on each window between window A and window C, exclusive,
2219 with the detail member of each
2220 <type>XFocusOutEvent</type>
2222 <symbol>NotifyNonlinearVirtual</symbol>.
2228 <symbol>FocusIn</symbol>
2229 event on each window between C and B, exclusive,
2230 with the detail member of each
2231 <type>XFocusInEvent</type>
2233 <symbol>NotifyNonlinearVirtual</symbol>.
2239 <symbol>FocusIn</symbol>
2240 event on window B, with the detail member of the
2241 <type>XFocusInEvent</type>
2243 <symbol>NotifyNonlinear</symbol>.
2248 If window P is an inferior of window B, it generates a
2249 <symbol>FocusIn</symbol>
2250 event on each window below window B down to and including window P,
2251 with the detail member of the
2252 <type>XFocusInEvent</type>
2254 <symbol>NotifyPointer</symbol>.
2260 When the focus moves from window A to window B on different screens
2261 and the pointer is in window P,
2262 the X server does the following:
2268 If window P is an inferior of window A, it generates a
2269 <symbol>FocusOut</symbol>
2270 event on each window from window P up to but not including window A,
2271 with the detail member of each
2272 <type>XFocusOutEvent</type>
2274 <symbol>NotifyPointer</symbol>.
2280 <symbol>FocusOut</symbol>
2282 with the detail member of the
2283 <type>XFocusOutEvent</type>
2285 <symbol>NotifyNonlinear</symbol>.
2290 If window A is not a root window,
2292 <symbol>FocusOut</symbol>
2293 event on each window above window A up to and including its root,
2294 with the detail member of each
2295 <type>XFocusOutEvent</type>
2297 <symbol>NotifyNonlinearVirtual</symbol>.
2302 If window B is not a root window,
2304 <symbol>FocusIn</symbol>
2305 event on each window from window B's root down to but not including
2306 window B, with the detail member of each
2307 <type>XFocusInEvent</type>
2309 <symbol>NotifyNonlinearVirtual</symbol>.
2315 <symbol>FocusIn</symbol>
2316 event on window B, with the detail member of each
2317 <type>XFocusInEvent</type>
2319 <symbol>NotifyNonlinear</symbol>.
2324 If window P is an inferior of window B, it generates a
2325 <symbol>FocusIn</symbol>
2326 event on each window below window B down to and including window P,
2327 with the detail member of each
2328 <type>XFocusInEvent</type>
2330 <symbol>NotifyPointer</symbol>.
2336 When the focus moves from window A to
2337 <symbol>PointerRoot</symbol>
2338 (events sent to the window under the pointer)
2340 <symbol>None</symbol>
2341 (discard), and the pointer is in window P,
2342 the X server does the following:
2348 If window P is an inferior of window A, it generates a
2349 <symbol>FocusOut</symbol>
2350 event on each window from window P up to but not including window A,
2351 with the detail member of each
2352 <type>XFocusOutEvent</type>
2354 <symbol>NotifyPointer</symbol>.
2360 <symbol>FocusOut</symbol>
2361 event on window A, with the detail member of the
2362 <type>XFocusOutEvent</type>
2364 <symbol>NotifyNonlinear</symbol>.
2369 If window A is not a root window,
2371 <symbol>FocusOut</symbol>
2372 event on each window above window A up to and including its root,
2373 with the detail member of each
2374 <type>XFocusOutEvent</type>
2376 <symbol>NotifyNonlinearVirtual</symbol>.
2382 <symbol>FocusIn</symbol>
2383 event on the root window of all screens, with the detail member of each
2384 <type>XFocusInEvent</type>
2386 <symbol>NotifyPointerRoot</symbol>
2388 <symbol>NotifyDetailNone</symbol>).
2394 <symbol>PointerRoot</symbol>,
2396 <symbol>FocusIn</symbol>
2397 event on each window from window P's root down to and including window P,
2398 with the detail member of each
2399 <type>XFocusInEvent</type>
2401 <symbol>NotifyPointer</symbol>.
2407 When the focus moves from
2408 <symbol>PointerRoot</symbol>
2409 (events sent to the window under the pointer)
2411 <symbol>None</symbol>
2412 to window A, and the pointer is in window P,
2413 the X server does the following:
2420 <symbol>PointerRoot</symbol>,
2422 <symbol>FocusOut</symbol>
2423 event on each window from window P up to and including window P's root,
2424 with the detail member of each
2425 <type>XFocusOutEvent</type>
2427 <symbol>NotifyPointer</symbol>.
2433 <symbol>FocusOut</symbol>
2434 event on all root windows,
2435 with the detail member of each
2436 <type>XFocusOutEvent</type>
2438 <symbol>NotifyPointerRoot</symbol>
2440 <symbol>NotifyDetailNone</symbol>).
2445 If window A is not a root window,
2447 <symbol>FocusIn</symbol>
2448 event on each window from window A's root down to but not including window A,
2449 with the detail member of each
2450 <type>XFocusInEvent</type>
2452 <symbol>NotifyNonlinearVirtual</symbol>.
2458 <symbol>FocusIn</symbol>
2460 with the detail member of the
2461 <type>XFocusInEvent</type>
2463 <symbol>NotifyNonlinear</symbol>.
2468 If window P is an inferior of window A, it generates a
2469 <symbol>FocusIn</symbol>
2470 event on each window below window A down to and including window P,
2471 with the detail member of each
2472 <type>XFocusInEvent</type>
2474 <symbol>NotifyPointer</symbol>.
2480 When the focus moves from
2481 <symbol>PointerRoot</symbol>
2482 (events sent to the window under the pointer)
2484 <symbol>None</symbol>
2485 (or vice versa), and the pointer is in window P,
2486 the X server does the following:
2493 <symbol>PointerRoot</symbol>,
2495 <symbol>FocusOut</symbol>
2496 event on each window from window P up to and including window P's root,
2497 with the detail member of each
2498 <type>XFocusOutEvent</type>
2500 <symbol>NotifyPointer</symbol>.
2506 <symbol>FocusOut</symbol>
2507 event on all root windows,
2508 with the detail member of each
2509 <type>XFocusOutEvent</type>
2510 structure set to either
2511 <symbol>NotifyPointerRoot</symbol>
2513 <symbol>NotifyDetailNone</symbol>.
2519 <symbol>FocusIn</symbol>
2520 event on all root windows,
2521 with the detail member of each
2522 <type>XFocusInEvent</type>
2524 <symbol>NotifyDetailNone</symbol>
2526 <symbol>NotifyPointerRoot</symbol>.
2532 <symbol>PointerRoot</symbol>,
2534 <symbol>FocusIn</symbol>
2535 event on each window from window P's root down to and including window P,
2536 with the detail member of each
2537 <type>XFocusInEvent</type>
2539 <symbol>NotifyPointer</symbol>.
2546 <sect2 id="Focus_Events_Generated_by_Grabs">
2547 <title>Focus Events Generated by Grabs</title>
2549 <!-- (SN Focus Events Generated by Grabs -->
2553 Focus events in which the keyboard grab activates
2555 <type>XFocusInEvent</type>
2557 <type>XFocusOutEvent</type>
2558 structures whose mode member is set to
2559 <symbol>NotifyGrab</symbol>.
2560 Focus events in which the keyboard grab deactivates
2562 <type>XFocusInEvent</type>
2564 <type>XFocusOutEvent</type>
2565 structures whose mode member is set to
2566 <symbol>NotifyUngrab</symbol>
2568 <xref linkend='XGrabKeyboard' xrefstyle='select: title'/>).
2573 When a keyboard grab activates before generating any actual
2574 <symbol>KeyPress</symbol>
2575 event that activates the grab,
2576 G is the grab_window, and F is the current focus,
2577 the X server does the following:
2584 <symbol>FocusIn</symbol>
2586 <symbol>FocusOut</symbol>
2587 events, with the mode members of the
2588 <type>XFocusInEvent</type>
2590 <type>XFocusOutEvent</type>
2592 <symbol>NotifyGrab</symbol>.
2593 These events are generated
2594 as if the focus were to change from
2601 When a keyboard grab deactivates after generating any actual
2602 <symbol>KeyRelease</symbol>
2603 event that deactivates the grab,
2604 G is the grab_window, and F is the current focus,
2605 the X server does the following:
2612 <symbol>FocusIn</symbol>
2614 <symbol>FocusOut</symbol>
2615 events, with the mode members of the
2616 <type>XFocusInEvent</type>
2618 <type>XFocusOutEvent</type>
2620 <symbol>NotifyUngrab</symbol>.
2621 These events are generated
2622 as if the focus were to change from
2630 <sect1 id="Key_Map_State_Notification_Events">
2631 <title>Key Map State Notification Events</title>
2633 <!-- (SN Key Map State Notification Events -->
2637 <indexterm><primary>Events</primary><secondary>KeymapNotify</secondary></indexterm>
2638 <indexterm significance="preferred"><primary>KeymapNotify</primary></indexterm>
2639 The X server can report
2640 <symbol>KeymapNotify</symbol>
2641 events to clients that want information about changes in their keyboard state.
2646 <symbol>KeymapNotify</symbol>
2648 <symbol>KeymapStateMask</symbol>
2649 bit in the event-mask attribute of the window.
2650 The X server generates this event immediately after every
2651 <symbol>EnterNotify</symbol>
2653 <symbol>FocusIn</symbol>
2658 The structure for this event type contains:
2662 <indexterm significance="preferred"><primary>XKeymapEvent</primary></indexterm>
2664 <literallayout class="monospaced">
2667 /* generated on EnterWindow and FocusIn when KeymapState selected */
2669 int type; /* KeymapNotify */
2670 unsigned long serial; /* # of last request processed by server */
2671 Bool send_event; /* true if this came from a SendEvent request */
2672 Display *display; /* Display the event was read from */
2674 char key_vector[32];
2681 The window member is not used but is present to aid some toolkits.
2682 The key_vector member is set to the bit vector of the keyboard.
2683 Each bit set to 1 indicates that the corresponding key
2684 is currently pressed.
2685 The vector is represented as 32 bytes.
2686 Byte N (from 0) contains the bits for keys 8N to 8N + 7
2687 with the least significant bit in the byte representing key 8N.
2690 <sect1 id="Exposure_Events">
2691 <title>Exposure Events</title>
2693 <!-- (SN Exposure Events -->
2697 The X protocol does not guarantee to preserve the contents of window
2699 the windows are obscured or reconfigured.
2700 Some implementations may preserve the contents of windows.
2701 Other implementations are free to destroy the contents of windows
2703 X expects client applications to assume the responsibility for
2704 restoring the contents of an exposed window region.
2705 (An exposed window region describes a formerly obscured window whose
2706 region becomes visible.)
2707 Therefore, the X server sends
2708 <symbol>Expose</symbol>
2709 events describing the window and the region of the window that has been exposed.
2710 A naive client application usually redraws the entire window.
2711 A more sophisticated client application redraws only the exposed region.
2713 <sect2 id="Expose_Events">
2714 <title>Expose Events</title>
2716 <!-- (SN Expose Events -->
2720 <indexterm><primary>Events</primary><secondary>Expose</secondary></indexterm>
2721 <indexterm significance="preferred"><primary>Expose</primary></indexterm>
2722 The X server can report
2723 <symbol>Expose</symbol>
2724 events to clients wanting information about when the contents of window regions
2726 The circumstances in which the X server generates
2727 <symbol>Expose</symbol>
2728 events are not as definite as those for other events.
2729 However, the X server never generates
2730 <symbol>Expose</symbol>
2731 events on windows whose class you specified as
2732 <symbol>InputOnly</symbol>.
2733 The X server can generate
2734 <symbol>Expose</symbol>
2735 events when no valid contents are available for regions of a window
2736 and either the regions are visible,
2737 the regions are viewable and the server is (perhaps newly) maintaining
2738 backing store on the window,
2739 or the window is not viewable but the server is (perhaps newly) honoring the
2740 window's backing-store attribute of
2741 <symbol>Always</symbol>
2743 <symbol>WhenMapped</symbol>.
2744 The regions decompose into an (arbitrary) set of rectangles,
2746 <symbol>Expose</symbol>
2747 event is generated for each rectangle.
2748 For any given window,
2749 the X server guarantees to report contiguously
2750 all of the regions exposed by some action that causes
2751 <symbol>Expose</symbol>
2752 events, such as raising a window.
2757 <symbol>Expose</symbol>
2759 <symbol>ExposureMask</symbol>
2760 bit in the event-mask attribute of the window.
2764 The structure for this event type contains:
2768 <indexterm significance="preferred"><primary>XExposeEvent</primary></indexterm>
2770 <literallayout class="monospaced">
2774 int type; /* Expose */
2775 unsigned long serial; /* # of last request processed by server */
2776 Bool send_event; /* true if this came from a SendEvent request */
2777 Display *display; /* Display the event was read from */
2781 int count; /* if nonzero, at least this many more */
2788 The window member is set to the exposed (damaged) window.
2789 The x and y members are set to the coordinates relative to the window's origin
2790 and indicate the upper-left corner of the rectangle.
2791 The width and height members are set to the size (extent) of the rectangle.
2792 The count member is set to the number of
2793 <symbol>Expose</symbol>
2794 events that are to follow.
2795 If count is zero, no more
2796 <symbol>Expose</symbol>
2797 events follow for this window.
2798 However, if count is nonzero, at least that number of
2799 <symbol>Expose</symbol>
2800 events (and possibly more) follow for this window.
2801 Simple applications that do not want to optimize redisplay by distinguishing
2802 between subareas of its window can just ignore all
2803 <symbol>Expose</symbol>
2804 events with nonzero counts and perform full redisplays
2805 on events with zero counts.
2808 <sect2 id="GraphicsExpose_and_NoExpose_Events">
2809 <title>GraphicsExpose and NoExpose Events</title>
2811 <!-- (SN GraphicsExpose and NoExpose Events -->
2815 <indexterm><primary>Events</primary><secondary>GraphicsExpose</secondary></indexterm>
2816 <indexterm><primary>Events</primary><secondary>NoExpose</secondary></indexterm>
2817 <indexterm significance="preferred"><primary>GraphicsExpose</primary></indexterm>
2818 The X server can report
2819 <symbol>GraphicsExpose</symbol>
2820 events to clients wanting information about when a destination region could not
2821 be computed during certain graphics requests:
2822 <xref linkend='XCopyArea' xrefstyle='select: title'/>
2824 <xref linkend='XCopyPlane' xrefstyle='select: title'/>.
2825 The X server generates this event whenever a destination region could not be
2826 computed because of an obscured or out-of-bounds source region.
2827 In addition, the X server guarantees to report contiguously all of the regions exposed by
2828 some graphics request
2829 (for example, copying an area of a drawable to a destination
2834 <indexterm significance="preferred"><primary>NoExpose</primary></indexterm>
2835 The X server generates a
2836 <symbol>NoExpose</symbol>
2837 event whenever a graphics request that might
2839 <symbol>GraphicsExpose</symbol>
2840 event does not produce any.
2841 In other words, the client is really asking for a
2842 <symbol>GraphicsExpose</symbol>
2843 event but instead receives a
2844 <symbol>NoExpose</symbol>
2850 <symbol>GraphicsExpose</symbol>
2852 <symbol>NoExpose</symbol>
2853 events, you must first set the graphics-exposure
2854 attribute of the graphics context to
2855 <symbol>True</symbol>.
2856 You also can set the graphics-expose attribute when creating a graphics
2858 <xref linkend='XCreateGC' xrefstyle='select: title'/>
2860 <xref linkend='XSetGraphicsExposures' xrefstyle='select: title'/>.
2864 The structures for these event types contain:
2868 <indexterm significance="preferred"><primary>XGraphicsExposeEvent</primary></indexterm>
2870 <literallayout class="monospaced">
2874 int type; /* GraphicsExpose */
2875 unsigned long serial; /* # of last request processed by server */
2876 Bool send_event; /* true if this came from a SendEvent request */
2877 Display *display; /* Display the event was read from */
2881 int count; /* if nonzero, at least this many more */
2882 int major_code; /* core is CopyArea or CopyPlane */
2883 int minor_code; /* not defined in the core */
2884 } XGraphicsExposeEvent;
2889 <indexterm significance="preferred"><primary>XNoExposeEvent</primary></indexterm>
2890 <literallayout class="monospaced">
2894 int type; /* NoExpose */
2895 unsigned long serial; /* # of last request processed by server */
2896 Bool send_event; /* true if this came from a SendEvent request */
2897 Display *display; /* Display the event was read from */
2899 int major_code; /* core is CopyArea or CopyPlane */
2900 int minor_code; /* not defined in the core */
2907 Both structures have these common members: drawable, major_code, and minor_code.
2908 The drawable member is set to the drawable of the destination region on
2909 which the graphics request was to be performed.
2910 The major_code member is set to the graphics request initiated by the client
2912 <symbol>X_CopyArea</symbol>
2914 <symbol>X_CopyPlane</symbol>.
2916 <symbol>X_CopyArea</symbol>,
2918 <xref linkend='XCopyArea' xrefstyle='select: title'/>
2919 initiated the request.
2921 <symbol>X_CopyPlane</symbol>,
2923 <xref linkend='XCopyPlane' xrefstyle='select: title'/>
2924 initiated the request.
2925 These constants are defined in
2926 <filename class="headerfile"><X11/Xproto.h></filename>.
2927 <indexterm type="file"><primary><filename class="headerfile">X11/Xproto.h</filename></primary></indexterm>
2928 <indexterm><primary>Files</primary><secondary><filename class="headerfile"><X11/Xproto.h></filename></secondary></indexterm>
2929 <indexterm><primary>Headers</primary><secondary><filename class="headerfile"><X11/Xproto.h></filename></secondary></indexterm>
2930 The minor_code member,
2931 like the major_code member,
2932 indicates which graphics request was initiated by
2934 However, the minor_code member is not defined by the core
2935 X protocol and will be zero in these cases,
2936 although it may be used by an extension.
2941 <structname>XGraphicsExposeEvent</structname>
2942 structure has these additional members: x, y, width, height, and count.
2943 The x and y members are set to the coordinates relative to the drawable's origin
2944 and indicate the upper-left corner of the rectangle.
2945 The width and height members are set to the size (extent) of the rectangle.
2946 The count member is set to the number of
2947 <symbol>GraphicsExpose</symbol>
2949 If count is zero, no more
2950 <symbol>GraphicsExpose</symbol>
2951 events follow for this window.
2952 However, if count is nonzero, at least that number of
2953 <symbol>GraphicsExpose</symbol>
2954 events (and possibly more) are to follow for this window.
2958 <sect1 id='Window_State_Change_Events'>
2959 <title>Window State Change Events</title>
2961 <!-- (SN Window State Change Events -->
2965 The following sections discuss:
2970 <symbol>CirculateNotify</symbol>
2976 <symbol>ConfigureNotify</symbol>
2982 <symbol>CreateNotify</symbol>
2988 <symbol>DestroyNotify</symbol>
2994 <symbol>GravityNotify</symbol>
3000 <symbol>MapNotify</symbol>
3006 <symbol>MappingNotify</symbol>
3012 <symbol>ReparentNotify</symbol>
3018 <symbol>UnmapNotify</symbol>
3024 <symbol>VisibilityNotify</symbol>
3030 <sect2 id="CirculateNotify_Events">
3031 <title>CirculateNotify Events</title>
3033 <!-- (SN CirculateNotify Events -->
3037 <indexterm><primary>Events</primary><secondary>CirculateNotify</secondary></indexterm>
3038 <indexterm significance="preferred"><primary>CirculateNotify</primary></indexterm>
3039 The X server can report
3040 <symbol>CirculateNotify</symbol>
3041 events to clients wanting information about when a window changes
3042 its position in the stack.
3043 The X server generates this event type whenever a window is actually restacked
3044 as a result of a client application calling
3045 <xref linkend='XCirculateSubwindows' xrefstyle='select: title'/>,
3046 <xref linkend='XCirculateSubwindowsUp' xrefstyle='select: title'/>,
3048 <xref linkend='XCirculateSubwindowsDown' xrefstyle='select: title'/>.
3053 <symbol>CirculateNotify</symbol>
3055 <symbol>StructureNotifyMask</symbol>
3056 bit in the event-mask attribute of the window
3058 <symbol>SubstructureNotifyMask</symbol>
3059 bit in the event-mask attribute of the parent window
3060 (in which case, circulating any child generates an event).
3064 The structure for this event type contains:
3068 <indexterm significance="preferred"><primary>XCirculateEvent</primary></indexterm>
3070 <literallayout class="monospaced">
3074 int type; /* CirculateNotify */
3075 unsigned long serial; /* # of last request processed by server */
3076 Bool send_event; /* true if this came from a SendEvent request */
3077 Display *display; /* Display the event was read from */
3080 int place; /* PlaceOnTop, PlaceOnBottom */
3087 The event member is set either to the restacked window or to its parent,
3088 depending on whether
3089 <systemitem class="event">StructureNotify</systemitem>
3091 <systemitem class="event">SubstructureNotify</systemitem>
3093 The window member is set to the window that was restacked.
3094 The place member is set to the window's position after the restack occurs and
3096 <symbol>PlaceOnTop</symbol>
3098 <symbol>PlaceOnBottom</symbol>.
3100 <symbol>PlaceOnTop</symbol>,
3101 the window is now on top of all siblings.
3103 <symbol>PlaceOnBottom</symbol>,
3104 the window is now below all siblings.
3107 <sect2 id="ConfigureNotify_Events">
3108 <title>ConfigureNotify Events</title>
3110 <!-- (SN ConfigureNotify Events -->
3114 <indexterm><primary>Events</primary><secondary>ConfigureNotify</secondary></indexterm>
3115 <indexterm significance="preferred"><primary>ConfigureNotify</primary></indexterm>
3116 The X server can report
3117 <symbol>ConfigureNotify</symbol>
3118 events to clients wanting information about actual changes to a window's
3119 state, such as size, position, border, and stacking order.
3120 The X server generates this event type whenever one of the following configure
3121 window requests made by a client application actually completes:
3126 A window's size, position, border, and/or stacking order is reconfigured
3128 <xref linkend='XConfigureWindow' xrefstyle='select: title'/>.
3133 The window's position in the stacking order is changed by calling
3134 <xref linkend='XLowerWindow' xrefstyle='select: title'/>,
3135 <xref linkend='XRaiseWindow' xrefstyle='select: title'/>,
3137 <xref linkend='XRestackWindows' xrefstyle='select: title'/>.
3142 A window is moved by calling
3143 <xref linkend='XMoveWindow' xrefstyle='select: title'/>.
3148 A window's size is changed by calling
3149 <xref linkend='XResizeWindow' xrefstyle='select: title'/>.
3154 A window's size and location is changed by calling
3155 <xref linkend='XMoveResizeWindow' xrefstyle='select: title'/>.
3160 A window is mapped and its position in the stacking order is changed
3162 <xref linkend='XMapRaised' xrefstyle='select: title'/>.
3167 A window's border width is changed by calling
3168 <xref linkend='XSetWindowBorderWidth' xrefstyle='select: title'/>.
3175 <symbol>ConfigureNotify</symbol>
3177 <symbol>StructureNotifyMask</symbol>
3178 bit in the event-mask attribute of the window or the
3179 <symbol>SubstructureNotifyMask</symbol>
3180 bit in the event-mask attribute of the parent window
3181 (in which case, configuring any child generates an event).
3185 The structure for this event type contains:
3188 <indexterm significance="preferred"><primary>XConfigureEvent</primary></indexterm>
3190 <literallayout class="monospaced">
3194 int type; /* ConfigureNotify */
3195 unsigned long serial; /* # of last request processed by server */
3196 Bool send_event; /* true if this came from a SendEvent request */
3197 Display *display; /* Display the event was read from */
3204 Bool override_redirect;
3210 The event member is set either to the reconfigured window or to its parent,
3211 depending on whether
3212 <systemitem class="event">StructureNotify</systemitem>
3214 <systemitem class="event">SubstructureNotify</systemitem>
3216 The window member is set to the window whose size, position,
3217 border, and/or stacking
3222 The x and y members are set to the coordinates relative to the parent window's
3223 origin and indicate the position of the upper-left outside corner of the window.
3224 The width and height members are set to the inside size of the window,
3227 The border_width member is set to the width of the window's border, in pixels.
3231 The above member is set to the sibling window and is used
3232 for stacking operations.
3233 If the X server sets this member to
3234 <symbol>None</symbol>,
3235 the window whose state was changed is on the bottom of the stack
3236 with respect to sibling windows.
3237 However, if this member is set to a sibling window,
3238 the window whose state was changed is placed on top of this sibling window.
3242 The override_redirect member is set to the override-redirect attribute of the
3244 Window manager clients normally should ignore this window if the
3245 override_redirect member
3247 <symbol>True</symbol>.
3250 <sect2 id="CreateNotify_Events">
3251 <title>CreateNotify Events</title>
3253 <!-- (SN CreateNotify Events -->
3257 <indexterm><primary>Events</primary><secondary>CreateNotify</secondary></indexterm>
3258 <indexterm significance="preferred"><primary>CreateNotify</primary></indexterm>
3259 The X server can report
3260 <symbol>CreateNotify</symbol>
3261 events to clients wanting information about creation of windows.
3262 The X server generates this event whenever a client
3263 application creates a window by calling
3264 <xref linkend='XCreateWindow' xrefstyle='select: title'/>
3266 <xref linkend='XCreateSimpleWindow' xrefstyle='select: title'/>.
3271 <symbol>CreateNotify</symbol>
3273 <symbol>SubstructureNotifyMask</symbol>
3274 bit in the event-mask attribute of the window.
3275 Creating any children then generates an event.
3279 The structure for the event type contains:
3283 <indexterm significance="preferred"><primary>XCreateWindowEvent</primary></indexterm>
3285 <literallayout class="monospaced">
3289 int type; /* CreateNotify */
3290 unsigned long serial; /* # of last request processed by server */
3291 Bool send_event; /* true if this came from a SendEvent request */
3292 Display *display; /* Display the event was read from */
3293 Window parent; /* parent of the window */
3294 Window window; /* window id of window created */
3295 int x, y; /* window location */
3296 int width, height; /* size of window */
3297 int border_width; /* border width */
3298 Bool override_redirect; /* creation should be overridden */
3299 } XCreateWindowEvent;
3305 The parent member is set to the created window's parent.
3306 The window member specifies the created window.
3307 The x and y members are set to the created window's coordinates relative
3308 to the parent window's origin and indicate the position of the upper-left
3309 outside corner of the created window.
3310 The width and height members are set to the inside size of the created window
3311 (not including the border) and are always nonzero.
3312 The border_width member is set to the width of the created window's border, in pixels.
3313 The override_redirect member is set to the override-redirect attribute of the
3315 Window manager clients normally should ignore this window
3316 if the override_redirect member is
3317 <symbol>True</symbol>.
3320 <sect2 id="DestroyNotify_Events">
3321 <title>DestroyNotify Events</title>
3323 <!-- (SN DestroyNotify Events -->
3327 <indexterm><primary>Events</primary><secondary>DestroyNotify</secondary></indexterm>
3328 <indexterm significance="preferred"><primary>DestroyNotify</primary></indexterm>
3329 The X server can report
3330 <symbol>DestroyNotify</symbol>
3331 events to clients wanting information about which windows are destroyed.
3332 The X server generates this event whenever a client application destroys a
3334 <xref linkend='XDestroyWindow' xrefstyle='select: title'/>
3336 <xref linkend='XDestroySubwindows' xrefstyle='select: title'/>.
3341 <symbol>DestroyNotify</symbol>
3342 events is such that for any given window,
3343 <symbol>DestroyNotify</symbol>
3344 is generated on all inferiors of the window
3345 before being generated on the window itself.
3346 The X protocol does not constrain the ordering among
3347 siblings and across subhierarchies.
3352 <symbol>DestroyNotify</symbol>
3354 <symbol>StructureNotifyMask</symbol>
3355 bit in the event-mask attribute of the window or the
3356 <symbol>SubstructureNotifyMask</symbol>
3357 bit in the event-mask attribute of the parent window
3358 (in which case, destroying any child generates an event).
3362 The structure for this event type contains:
3366 <indexterm significance="preferred"><primary>XDestroyWindowEvent</primary></indexterm>
3368 <literallayout class="monospaced">
3372 int type; /* DestroyNotify */
3373 unsigned long serial; /* # of last request processed by server */
3374 Bool send_event; /* true if this came from a SendEvent request */
3375 Display *display; /* Display the event was read from */
3378 } XDestroyWindowEvent;
3384 The event member is set either to the destroyed window or to its parent,
3385 depending on whether
3386 <systemitem class="event">StructureNotify</systemitem>
3388 <systemitem class="event">SubstructureNotify</systemitem>
3390 The window member is set to the window that is destroyed.
3393 <sect2 id="GravityNotify_Events">
3394 <title>GravityNotify Events</title>
3396 <!-- (SN GravityNotify Events -->
3400 <indexterm><primary>Events</primary><secondary>GravityNotify</secondary></indexterm>
3401 <indexterm significance="preferred"><primary>GravityNotify</primary></indexterm>
3402 The X server can report
3403 <symbol>GravityNotify</symbol>
3404 events to clients wanting information about when a window is moved because of a
3405 change in the size of its parent.
3406 The X server generates this event whenever a client
3407 application actually moves a child window as a result of resizing its parent by calling
3408 <xref linkend='XConfigureWindow' xrefstyle='select: title'/>,
3409 <xref linkend='XMoveResizeWindow' xrefstyle='select: title'/>,
3411 <xref linkend='XResizeWindow' xrefstyle='select: title'/>.
3416 <symbol>GravityNotify</symbol>
3418 <symbol>StructureNotifyMask</symbol>
3419 bit in the event-mask attribute of the window or the
3420 <symbol>SubstructureNotifyMask</symbol>
3421 bit in the event-mask attribute of the parent window
3422 (in which case, any child that is moved because its parent has been resized
3423 generates an event).
3427 The structure for this event type contains:
3431 <indexterm significance="preferred"><primary>XGravityEvent</primary></indexterm>
3433 <literallayout class="monospaced">
3437 int type; /* GravityNotify */
3438 unsigned long serial; /* # of last request processed by server */
3439 Bool send_event; /* true if this came from a SendEvent request */
3440 Display *display; /* Display the event was read from */
3450 The event member is set either to the window that was moved or to its parent,
3451 depending on whether
3452 <systemitem class="event">StructureNotify</systemitem>
3454 <systemitem class="event">SubstructureNotify</systemitem>
3456 The window member is set to the child window that was moved.
3457 The x and y members are set to the coordinates relative to the
3458 new parent window's origin
3459 and indicate the position of the upper-left outside corner of the
3463 <sect2 id="MapNotify_Events">
3464 <title>MapNotify Events</title>
3466 <!-- (SN MapNotify Events -->
3470 <indexterm><primary>Events</primary><secondary>MapNotify</secondary></indexterm>
3471 <indexterm significance="preferred"><primary>MapNotify</primary></indexterm>
3472 The X server can report
3473 <symbol>MapNotify</symbol>
3474 events to clients wanting information about which windows are mapped.
3475 The X server generates this event type whenever a client application changes the
3476 window's state from unmapped to mapped by calling
3477 <xref linkend='XMapWindow' xrefstyle='select: title'/>,
3478 <xref linkend='XMapRaised' xrefstyle='select: title'/>,
3479 <xref linkend='XMapSubwindows' xrefstyle='select: title'/>,
3480 <xref linkend='XReparentWindow' xrefstyle='select: title'/>,
3481 or as a result of save-set processing.
3486 <symbol>MapNotify</symbol>
3488 <symbol>StructureNotifyMask</symbol>
3489 bit in the event-mask attribute of the window or the
3490 <symbol>SubstructureNotifyMask</symbol>
3491 bit in the event-mask attribute of the parent window
3492 (in which case, mapping any child generates an event).
3496 The structure for this event type contains:
3500 <indexterm significance="preferred"><primary>XMapEvent</primary></indexterm>
3502 <literallayout class="monospaced">
3506 int type; /* MapNotify */
3507 unsigned long serial; /* # of last request processed by server */
3508 Bool send_event; /* true if this came from a SendEvent request */
3509 Display *display; /* Display the event was read from */
3512 Bool override_redirect; /* boolean, is override set... */
3519 The event member is set either to the window that was mapped or to its parent,
3520 depending on whether
3521 <systemitem class="event">StructureNotify</systemitem>
3523 <systemitem class="event">SubstructureNotify</systemitem>
3525 The window member is set to the window that was mapped.
3526 The override_redirect member is set to the override-redirect attribute
3528 Window manager clients normally should ignore this window
3529 if the override-redirect attribute is
3530 <symbol>True</symbol>,
3531 because these events usually are generated from pop-ups,
3532 which override structure control.
3535 <sect2 id="MappingNotify_Events">
3536 <title>MappingNotify Events</title>
3538 <!-- (SN MappingNotify Events -->
3542 <indexterm><primary>Events</primary><secondary>MappingNotify</secondary></indexterm>
3543 <indexterm significance="preferred"><primary>MappingNotify</primary></indexterm>
3544 The X server reports
3545 <symbol>MappingNotify</symbol>
3546 events to all clients.
3547 There is no mechanism to express disinterest in this event.
3548 The X server generates this event type whenever a client application
3554 <xref linkend='XSetModifierMapping' xrefstyle='select: title'/>
3555 to indicate which KeyCodes are to be used as modifiers
3560 <xref linkend='XChangeKeyboardMapping' xrefstyle='select: title'/>
3561 to change the keyboard mapping
3566 <xref linkend='XSetPointerMapping' xrefstyle='select: title'/>
3567 to set the pointer mapping
3573 The structure for this event type contains:
3577 <indexterm significance="preferred"><primary>XMappingEvent</primary></indexterm>
3579 <literallayout class="monospaced">
3583 int type; /* MappingNotify */
3584 unsigned long serial; /* # of last request processed by server */
3585 Bool send_event; /* true if this came from a SendEvent request */
3586 Display *display; /* Display the event was read from */
3587 Window window; /* unused */
3588 int request; /* one of MappingModifier, MappingKeyboard,
3590 int first_keycode; /* first keycode */
3591 int count; /* defines range of change w. first_keycode*/
3598 The request member is set to indicate the kind of mapping change that occurred
3600 <symbol>MappingModifier</symbol>,
3601 <symbol>MappingKeyboard</symbol>,
3603 <symbol>MappingPointer</symbol>.
3605 <symbol>MappingModifier</symbol>,
3606 the modifier mapping was changed.
3608 <symbol>MappingKeyboard</symbol>,
3609 the keyboard mapping was changed.
3611 <symbol>MappingPointer</symbol>,
3612 the pointer button mapping was changed.
3613 The first_keycode and count members are set only
3614 if the request member was set to
3615 <symbol>MappingKeyboard</symbol>.
3616 The number in first_keycode represents the first number in the range
3617 of the altered mapping,
3618 and count represents the number of keycodes altered.
3622 To update the client application's knowledge of the keyboard,
3624 <xref linkend='XRefreshKeyboardMapping' xrefstyle='select: title'/>.
3627 <sect2 id="ReparentNotify_Events">
3628 <title>ReparentNotify Events</title>
3630 <!-- (SN ReparentNotify Events -->
3634 <indexterm><primary>Events</primary><secondary>ReparentNotify</secondary></indexterm>
3635 <indexterm significance="preferred"><primary>ReparentNotify</primary></indexterm>
3636 The X server can report
3637 <symbol>ReparentNotify</symbol>
3638 events to clients wanting information about changing a window's parent.
3639 The X server generates this event whenever a client
3641 <xref linkend='XReparentWindow' xrefstyle='select: title'/>
3642 and the window is actually reparented.
3647 <symbol>ReparentNotify</symbol>
3649 <symbol>StructureNotifyMask</symbol>
3650 bit in the event-mask attribute of the window or the
3651 <symbol>SubstructureNotifyMask</symbol>
3652 bit in the event-mask attribute of either the old or the new parent window
3653 (in which case, reparenting any child generates an event).
3657 The structure for this event type contains:
3661 <indexterm significance="preferred"><primary>XReparentEvent</primary></indexterm>
3663 <literallayout class="monospaced">
3667 int type; /* ReparentNotify */
3668 unsigned long serial; /* # of last request processed by server */
3669 Bool send_event; /* true if this came from a SendEvent request */
3670 Display *display; /* Display the event was read from */
3675 Bool override_redirect;
3682 The event member is set either to the reparented window
3683 or to the old or the new parent, depending on whether
3684 <systemitem class="event">StructureNotify</systemitem>
3686 <systemitem class="event">SubstructureNotify</systemitem>
3688 The window member is set to the window that was reparented.
3689 The parent member is set to the new parent window.
3690 The x and y members are set to the reparented window's coordinates relative
3691 to the new parent window's
3692 origin and define the upper-left outer corner of the reparented window.
3693 The override_redirect member is set to the override-redirect attribute of the
3694 window specified by the window member.
3695 Window manager clients normally should ignore this window
3696 if the override_redirect member is
3697 <symbol>True</symbol>.
3700 <sect2 id="UnmapNotify_Events">
3701 <title>UnmapNotify Events</title>
3703 <!-- (SN UnmapNotify Events -->
3707 <indexterm><primary>Events</primary><secondary>UnmapNotify</secondary></indexterm>
3708 <indexterm significance="preferred"><primary>UnmapNotify</primary></indexterm>
3709 The X server can report
3710 <symbol>UnmapNotify</symbol>
3711 events to clients wanting information about which windows are unmapped.
3712 The X server generates this event type whenever a client application changes the
3713 window's state from mapped to unmapped.
3718 <symbol>UnmapNotify</symbol>
3720 <symbol>StructureNotifyMask</symbol>
3721 bit in the event-mask attribute of the window or the
3722 <symbol>SubstructureNotifyMask</symbol>
3723 bit in the event-mask attribute of the parent window
3724 (in which case, unmapping any child window generates an event).
3728 The structure for this event type contains:
3732 <indexterm significance="preferred"><primary>XUnmapEvent</primary></indexterm>
3734 <literallayout class="monospaced">
3738 int type; /* UnmapNotify */
3739 unsigned long serial; /* # of last request processed by server */
3740 Bool send_event; /* true if this came from a SendEvent request */
3741 Display *display; /* Display the event was read from */
3744 Bool from_configure;
3751 The event member is set either to the unmapped window or to its parent,
3752 depending on whether
3753 <systemitem class="event">StructureNotify</systemitem>
3755 <systemitem class="event">SubstructureNotify</systemitem>
3757 This is the window used by the X server to report the event.
3758 The window member is set to the window that was unmapped.
3759 The from_configure member is set to
3760 <symbol>True</symbol>
3761 if the event was generated as a result of a resizing of the window's parent when
3762 the window itself had a win_gravity of
3763 <symbol>UnmapGravity</symbol>.
3766 <sect2 id="VisibilityNotify_Events">
3767 <title>VisibilityNotify Events</title>
3769 <!-- (SN VisibilityNotify Events -->
3773 <indexterm><primary>Events</primary><secondary>VisibilityNotify</secondary></indexterm>
3774 <indexterm significance="preferred"><primary>VisibilityNotify</primary></indexterm>
3775 The X server can report
3776 <symbol>VisibilityNotify</symbol>
3777 events to clients wanting any change in the visibility of the specified window.
3778 A region of a window is visible if someone looking at the screen can
3780 The X server generates this event whenever the visibility changes state.
3781 However, this event is never generated for windows whose class is
3782 <symbol>InputOnly</symbol>.
3787 <symbol>VisibilityNotify</symbol>
3788 events caused by a hierarchy change are generated
3789 after any hierarchy event
3790 (<symbol>UnmapNotify</symbol>,
3791 <symbol>MapNotify</symbol>,
3792 <symbol>ConfigureNotify</symbol>,
3793 <symbol>GravityNotify</symbol>,
3794 <symbol>CirculateNotify</symbol>)
3795 caused by that change. Any
3796 <symbol>VisibilityNotify</symbol>
3797 event on a given window is generated before any
3798 <symbol>Expose</symbol>
3799 events on that window, but it is not required that all
3800 <symbol>VisibilityNotify</symbol>
3801 events on all windows be generated before all
3802 <symbol>Expose</symbol>
3803 events on all windows.
3804 The X protocol does not constrain the ordering of
3805 <symbol>VisibilityNotify</symbol>
3808 <symbol>FocusOut</symbol>,
3809 <symbol>EnterNotify</symbol>,
3811 <symbol>LeaveNotify</symbol>
3817 <symbol>VisibilityNotify</symbol>
3819 <symbol>VisibilityChangeMask</symbol>
3820 bit in the event-mask attribute of the window.
3824 The structure for this event type contains:
3828 <indexterm significance="preferred"><primary>XVisibilityEvent</primary></indexterm>
3830 <literallayout class="monospaced">
3834 int type; /* VisibilityNotify */
3835 unsigned long serial; /* # of last request processed by server */
3836 Bool send_event; /* true if this came from a SendEvent request */
3837 Display *display; /* Display the event was read from */
3846 The window member is set to the window whose visibility state changes.
3847 The state member is set to the state of the window's visibility and can be
3848 <symbol>VisibilityUnobscured</symbol>,
3849 <symbol>VisibilityPartiallyObscured</symbol>,
3851 <symbol>VisibilityFullyObscured</symbol>.
3852 The X server ignores all of a window's subwindows
3853 when determining the visibility state of the window and processes
3854 <symbol>VisibilityNotify</symbol>
3855 events according to the following:
3860 When the window changes state from partially obscured, fully obscured,
3861 or not viewable to viewable and completely unobscured,
3862 the X server generates the event with the state member of the
3863 <structname>XVisibilityEvent</structname>
3865 <symbol>VisibilityUnobscured</symbol>.
3870 When the window changes state from viewable and completely unobscured or
3871 not viewable to viewable and partially obscured,
3872 the X server generates the event with the state member of the
3873 <structname>XVisibilityEvent</structname>
3875 <symbol>VisibilityPartiallyObscured</symbol>.
3880 When the window changes state from viewable and completely unobscured,
3881 viewable and partially obscured, or not viewable to viewable and
3883 the X server generates the event with the state member of the
3884 <structname>XVisibilityEvent</structname>
3886 <symbol>VisibilityFullyObscured</symbol>.
3892 <sect1 id="Structure_Control_Events">
3893 <title>Structure Control Events</title>
3895 <!-- (SN Structure Control Events -->
3899 This section discusses:
3904 <symbol>CirculateRequest</symbol>
3910 <symbol>ConfigureRequest</symbol>
3916 <symbol>MapRequest</symbol>
3922 <symbol>ResizeRequest</symbol>
3927 <sect2 id="CirculateRequest_Events">
3928 <title>CirculateRequest Events</title>
3930 <!-- (SN CirculateRequest Events -->
3934 <indexterm><primary>Events</primary><secondary>CirculateRequest</secondary></indexterm>
3935 <indexterm significance="preferred"><primary>CirculateRequest</primary></indexterm>
3936 The X server can report
3937 <symbol>CirculateRequest</symbol>
3938 events to clients wanting information about
3939 when another client initiates a circulate window request
3940 on a specified window.
3941 The X server generates this event type whenever a client initiates a circulate
3942 window request on a window and a subwindow actually needs to be restacked.
3943 The client initiates a circulate window request on the window by calling
3944 <xref linkend='XCirculateSubwindows' xrefstyle='select: title'/>,
3945 <xref linkend='XCirculateSubwindowsUp' xrefstyle='select: title'/>,
3947 <xref linkend='XCirculateSubwindowsDown' xrefstyle='select: title'/>.
3952 <symbol>CirculateRequest</symbol>
3954 <symbol>SubstructureRedirectMask</symbol>
3955 in the event-mask attribute of the window.
3956 Then, in the future,
3957 the circulate window request for the specified window is not executed,
3958 and thus, any subwindow's position in the stack is not changed.
3959 For example, suppose a client application calls
3960 <xref linkend='XCirculateSubwindowsUp' xrefstyle='select: title'/>
3961 to raise a subwindow to the top of the stack.
3963 <symbol>SubstructureRedirectMask</symbol>
3964 on the window, the X server reports to you a
3965 <symbol>CirculateRequest</symbol>
3966 event and does not raise the subwindow to the top of the stack.
3970 The structure for this event type contains:
3974 <indexterm significance="preferred"><primary>XCirculateRequestEvent</primary></indexterm>
3976 <literallayout class="monospaced">
3980 int type; /* CirculateRequest */
3981 unsigned long serial; /* # of last request processed by server */
3982 Bool send_event; /* true if this came from a SendEvent request */
3983 Display *display; /* Display the event was read from */
3986 int place; /* PlaceOnTop, PlaceOnBottom */
3987 } XCirculateRequestEvent;
3993 The parent member is set to the parent window.
3994 The window member is set to the subwindow to be restacked.
3995 The place member is set to what the new position in the stacking order should be
3997 <symbol>PlaceOnTop</symbol>
3999 <symbol>PlaceOnBottom</symbol>.
4001 <symbol>PlaceOnTop</symbol>,
4002 the subwindow should be on top of all siblings.
4004 <symbol>PlaceOnBottom</symbol>,
4005 the subwindow should be below all siblings.
4008 <sect2 id="ConfigureRequest_Events">
4009 <title>ConfigureRequest Events</title>
4011 <!-- (SN ConfigureRequest Events -->
4015 <indexterm><primary>Events</primary><secondary>ConfigureRequest</secondary></indexterm>
4016 <indexterm significance="preferred"><primary>ConfigureRequest</primary></indexterm>
4017 The X server can report
4018 <symbol>ConfigureRequest</symbol>
4019 events to clients wanting information about when a different client initiates
4020 a configure window request on any child of a specified window.
4021 The configure window request attempts to
4022 reconfigure a window's size, position, border, and stacking order.
4023 The X server generates this event whenever a different client initiates
4024 a configure window request on a window by calling
4025 <xref linkend='XConfigureWindow' xrefstyle='select: title'/>,
4026 <xref linkend='XLowerWindow' xrefstyle='select: title'/>,
4027 <xref linkend='XRaiseWindow' xrefstyle='select: title'/>,
4028 <xref linkend='XMapRaised' xrefstyle='select: title'/>,
4029 <xref linkend='XMoveResizeWindow' xrefstyle='select: title'/>,
4030 <xref linkend='XMoveWindow' xrefstyle='select: title'/>,
4031 <xref linkend='XResizeWindow' xrefstyle='select: title'/>,
4032 <xref linkend='XRestackWindows' xrefstyle='select: title'/>,
4034 <xref linkend='XSetWindowBorderWidth' xrefstyle='select: title'/>.
4039 <symbol>ConfigureRequest</symbol>
4041 <symbol>SubstructureRedirectMask</symbol>
4042 bit in the event-mask attribute of the window.
4043 <symbol>ConfigureRequest</symbol>
4044 events are generated when a
4045 <systemitem>ConfigureWindow</systemitem>
4046 protocol request is issued on a child window by another client.
4047 For example, suppose a client application calls
4048 <xref linkend='XLowerWindow' xrefstyle='select: title'/>
4051 <symbol>SubstructureRedirectMask</symbol>
4052 on the parent window and if the override-redirect attribute
4053 of the window is set to
4054 <symbol>False</symbol>,
4055 the X server reports a
4056 <symbol>ConfigureRequest</symbol>
4057 event to you and does not lower the specified window.
4061 The structure for this event type contains:
4065 <indexterm significance="preferred"><primary>XConfigureRequestEvent</primary></indexterm>
4067 <literallayout class="monospaced">
4071 int type; /* ConfigureRequest */
4072 unsigned long serial; /* # of last request processed by server */
4073 Bool send_event; /* true if this came from a SendEvent request */
4074 Display *display; /* Display the event was read from */
4081 int detail; /* Above, Below, TopIf, BottomIf, Opposite */
4082 unsigned long value_mask;
4083 } XConfigureRequestEvent;
4089 The parent member is set to the parent window.
4090 The window member is set to the window whose size, position, border width,
4091 and/or stacking order is to be reconfigured.
4092 The value_mask member indicates which components were specified in the
4093 <systemitem>ConfigureWindow</systemitem>
4095 The corresponding values are reported as given in the request.
4096 The remaining values are filled in from the current geometry of the window,
4097 except in the case of above (sibling) and detail (stack-mode),
4098 which are reported as
4099 <symbol>None</symbol>
4101 <symbol>Above</symbol>,
4102 respectively, if they are not given in the request.
4105 <sect2 id="MapRequest_Events">
4106 <title>MapRequest Events</title>
4108 <!-- (SN MapRequest Events -->
4112 <indexterm><primary>Events</primary><secondary>MapRequest</secondary></indexterm>
4113 <indexterm significance="preferred"><primary>MapRequest</primary></indexterm>
4114 The X server can report
4115 <symbol>MapRequest</symbol>
4116 events to clients wanting information about a different client's desire
4118 A window is considered mapped when a map window request completes.
4119 The X server generates this event whenever a different client initiates
4120 a map window request on an unmapped window whose override_redirect member
4122 <symbol>False</symbol>.
4123 Clients initiate map window requests by calling
4124 <xref linkend='XMapWindow' xrefstyle='select: title'/>,
4125 <xref linkend='XMapRaised' xrefstyle='select: title'/>,
4127 <xref linkend='XMapSubwindows' xrefstyle='select: title'/>.
4132 <symbol>MapRequest</symbol>
4134 <symbol>SubstructureRedirectMask</symbol>
4135 bit in the event-mask attribute of the window.
4136 This means another client's attempts to map a child window by calling one of
4137 the map window request functions is intercepted, and you are sent a
4138 <symbol>MapRequest</symbol>
4140 For example, suppose a client application calls
4141 <xref linkend='XMapWindow' xrefstyle='select: title'/>
4143 If you (usually a window manager) had selected
4144 <symbol>SubstructureRedirectMask</symbol>
4145 on the parent window and if the override-redirect attribute
4146 of the window is set to
4147 <symbol>False</symbol>,
4148 the X server reports a
4149 <symbol>MapRequest</symbol>
4151 and does not map the specified window.
4152 Thus, this event gives your window manager client the ability
4153 to control the placement of subwindows.
4157 The structure for this event type contains:
4161 <indexterm significance="preferred"><primary>XMapRequestEvent</primary></indexterm>
4163 <literallayout class="monospaced">
4167 int type; /* MapRequest */
4168 unsigned long serial; /* # of last request processed by server */
4169 Bool send_event; /* true if this came from a SendEvent request */
4170 Display *display; /* Display the event was read from */
4179 The parent member is set to the parent window.
4180 The window member is set to the window to be mapped.
4183 <sect2 id="ResizeRequest_Events">
4184 <title>ResizeRequest Events</title>
4186 <!-- (SN ResizeRequest Events -->
4190 <indexterm><primary>Events</primary><secondary>ResizeRequest</secondary></indexterm>
4191 <indexterm significance="preferred"><primary>ResizeRequest</primary></indexterm>
4192 The X server can report
4193 <symbol>ResizeRequest</symbol>
4194 events to clients wanting information about another client's attempts to change the
4196 The X server generates this event whenever some other client attempts to change
4197 the size of the specified window by calling
4198 <xref linkend='XConfigureWindow' xrefstyle='select: title'/>,
4199 <xref linkend='XResizeWindow' xrefstyle='select: title'/>,
4201 <xref linkend='XMoveResizeWindow' xrefstyle='select: title'/>.
4206 <symbol>ResizeRequest</symbol>
4208 <symbol>ResizeRedirect</symbol>
4209 bit in the event-mask attribute of the window.
4210 Any attempts to change the size by other clients are then redirected.
4214 The structure for this event type contains:
4218 <indexterm significance="preferred"><primary>XResizeRequestEvent</primary></indexterm>
4220 <literallayout class="monospaced">
4224 int type; /* ResizeRequest */
4225 unsigned long serial; /* # of last request processed by server */
4226 Bool send_event; /* true if this came from a SendEvent request */
4227 Display *display; /* Display the event was read from */
4230 } XResizeRequestEvent;
4236 The window member is set to the window whose size another
4237 client attempted to change.
4238 The width and height members are set to the inside size of the window,
4239 excluding the border.
4243 <sect1 id="Colormap_State_Change_Events">
4244 <title>Colormap State Change Events</title>
4246 <!-- (SN Colormap State Change Events -->
4250 <indexterm><primary>Events</primary><secondary>ColormapNotify</secondary></indexterm>
4251 <indexterm significance="preferred"><primary>ColormapNotify</primary></indexterm>
4252 The X server can report
4253 <symbol>ColormapNotify</symbol>
4254 events to clients wanting information about when the colormap changes
4255 and when a colormap is installed or uninstalled.
4256 The X server generates this event type whenever a client application:
4261 Changes the colormap member of the
4262 <structname>XSetWindowAttributes</structname>
4265 <xref linkend='XChangeWindowAttributes' xrefstyle='select: title'/>,
4266 <xref linkend='XFreeColormap' xrefstyle='select: title'/>,
4268 <xref linkend='XSetWindowColormap' xrefstyle='select: title'/>
4273 Installs or uninstalls the colormap by calling
4274 <xref linkend='XInstallColormap' xrefstyle='select: title'/>
4276 <xref linkend='XUninstallColormap' xrefstyle='select: title'/>
4283 <symbol>ColormapNotify</symbol>
4285 <symbol>ColormapChangeMask</symbol>
4286 bit in the event-mask attribute of the window.
4290 The structure for this event type contains:
4294 <indexterm significance="preferred"><primary>XColormapEvent</primary></indexterm>
4296 <literallayout class="monospaced">
4300 int type; /* ColormapNotify */
4301 unsigned long serial; /* # of last request processed by server */
4302 Bool send_event; /* true if this came from a SendEvent request */
4303 Display *display; /* Display the event was read from */
4305 Colormap colormap; /* colormap or None */
4307 int state; /* ColormapInstalled, ColormapUninstalled */
4314 The window member is set to the window whose associated
4315 colormap is changed, installed, or uninstalled.
4316 For a colormap that is changed, installed, or uninstalled,
4317 the colormap member is set to the colormap associated with the window.
4318 For a colormap that is changed by a call to
4319 <xref linkend='XFreeColormap' xrefstyle='select: title'/>,
4320 the colormap member is set to
4321 <symbol>None</symbol>.
4322 The new member is set to indicate whether the colormap
4323 for the specified window was changed or installed or uninstalled
4325 <symbol>True</symbol>
4327 <symbol>False</symbol>.
4329 <symbol>True</symbol>,
4330 the colormap was changed.
4332 <symbol>False</symbol>,
4333 the colormap was installed or uninstalled.
4334 The state member is always set to indicate whether the colormap is installed or
4335 uninstalled and can be
4336 <symbol>ColormapInstalled</symbol>
4338 <symbol>ColormapUninstalled</symbol>.
4341 <sect1 id="Client_Communication_Events">
4342 <title>Client Communication Events</title>
4344 <!-- (SN Client Communication Events -->
4348 This section discusses:
4353 <symbol>ClientMessage</symbol>
4359 <symbol>PropertyNotify</symbol>
4365 <symbol>SelectionClear</symbol>
4371 <symbol>SelectionNotify</symbol>
4377 <symbol>SelectionRequest</symbol>
4382 <sect2 id="ClientMessage_Events">
4383 <title>ClientMessage Events</title>
4385 <!-- (SN ClientMessage Events -->
4389 <indexterm><primary>Events</primary><secondary>ClientMessage</secondary></indexterm>
4390 <indexterm significance="preferred"><primary>ClientMessage</primary></indexterm>
4391 The X server generates
4392 <symbol>ClientMessage</symbol>
4393 events only when a client calls the function
4394 <xref linkend='XSendEvent' xrefstyle='select: title'/>.
4398 The structure for this event type contains:
4402 <indexterm significance="preferred"><primary>XClientMessageEvent</primary></indexterm>
4404 <literallayout class="monospaced">
4405 <!-- .TA .5i 1i 3i -->
4406 <!-- .ta .5i 1i 3i -->
4408 int type; /* ClientMessage */
4409 unsigned long serial; /* # of last request processed by server */
4410 Bool send_event; /* true if this came from a SendEvent request */
4411 Display *display; /* Display the event was read from */
4420 } XClientMessageEvent;
4426 The message_type member is set to an atom that indicates how the data
4427 should be interpreted by the receiving client.
4428 The format member is set to 8, 16, or 32 and specifies whether the data
4429 should be viewed as a list of bytes, shorts, or longs.
4430 The data member is a union that contains the members b, s, and l.
4431 The b, s, and l members represent data of twenty 8-bit values,
4432 ten 16-bit values, and five 32-bit values.
4433 Particular message types might not make use of all these values.
4434 The X server places no interpretation on the values in the window,
4435 message_type, or data members.
4438 <sect2 id="PropertyNotify_Events">
4439 <title>PropertyNotify Events</title>
4441 <!-- (SN PropertyNotify Events -->
4445 <indexterm><primary>Events</primary><secondary>PropertyNotify</secondary></indexterm>
4446 <indexterm significance="preferred"><primary>PropertyNotify</primary></indexterm>
4447 The X server can report
4448 <symbol>PropertyNotify</symbol>
4449 events to clients wanting information about property changes
4450 for a specified window.
4455 <symbol>PropertyNotify</symbol>
4457 <symbol>PropertyChangeMask</symbol>
4458 bit in the event-mask attribute of the window.
4462 The structure for this event type contains:
4466 <indexterm significance="preferred"><primary>XPropertyEvent</primary></indexterm>
4468 <literallayout class="monospaced">
4472 int type; /* PropertyNotify */
4473 unsigned long serial; /* # of last request processed by server */
4474 Bool send_event; /* true if this came from a SendEvent request */
4475 Display *display; /* Display the event was read from */
4479 int state; /* PropertyNewValue or PropertyDelete */
4486 The window member is set to the window whose associated
4487 property was changed.
4488 The atom member is set to the property's atom and indicates which
4489 property was changed or desired.
4490 The time member is set to the server time when the property was changed.
4491 The state member is set to indicate whether the property was changed
4492 to a new value or deleted and can be
4493 <symbol>PropertyNewValue</symbol>
4495 <symbol>PropertyDelete</symbol>.
4496 The state member is set to
4497 <symbol>PropertyNewValue</symbol>
4498 when a property of the window is changed using
4499 <xref linkend='XChangeProperty' xrefstyle='select: title'/>
4501 <xref linkend='XRotateWindowProperties' xrefstyle='select: title'/>
4502 (even when adding zero-length data using
4503 <xref linkend='XChangeProperty' xrefstyle='select: title'/>)
4504 and when replacing all or part of a property with identical data using
4505 <xref linkend='XChangeProperty' xrefstyle='select: title'/>
4507 <xref linkend='XRotateWindowProperties' xrefstyle='select: title'/>.
4508 The state member is set to
4509 <symbol>PropertyDelete</symbol>
4510 when a property of the window is deleted using
4511 <xref linkend='XDeleteProperty' xrefstyle='select: title'/>
4512 or, if the delete argument is
4513 <symbol>True</symbol>,
4514 <xref linkend='XGetWindowProperty' xrefstyle='select: title'/>.
4517 <sect2 id="SelectionClear_Events">
4518 <title>SelectionClear Events</title>
4520 <!-- (SN SelectionClear Events -->
4524 <indexterm ><primary>Events</primary><secondary>SelectionClear</secondary></indexterm>
4525 <indexterm significance="preferred"><primary>SelectionClear</primary></indexterm>
4526 The X server reports
4527 <symbol>SelectionClear</symbol>
4528 events to the client losing ownership of a selection.
4529 The X server generates this event type when another client
4530 asserts ownership of the selection by calling
4531 <xref linkend='XSetSelectionOwner' xrefstyle='select: title'/>.
4535 The structure for this event type contains:
4539 <indexterm significance="preferred"><primary>XSelectionClearEvent</primary></indexterm>
4541 <literallayout class="monospaced">
4545 int type; /* SelectionClear */
4546 unsigned long serial; /* # of last request processed by server */
4547 Bool send_event; /* true if this came from a SendEvent request */
4548 Display *display; /* Display the event was read from */
4552 } XSelectionClearEvent;
4558 The selection member is set to the selection atom.
4559 The time member is set to the last change time recorded for the
4561 The window member is the window that was specified by the current owner
4562 (the owner losing the selection) in its
4563 <xref linkend='XSetSelectionOwner' xrefstyle='select: title'/>
4567 <sect2 id="SelectionRequest_Events">
4568 <title>SelectionRequest Events</title>
4570 <!-- (SN SelectionRequest Events -->
4574 <indexterm><primary>Events</primary><secondary>SelectionRequest</secondary></indexterm>
4575 <indexterm significance="preferred"><primary>SelectionRequest</primary></indexterm>
4576 The X server reports
4577 <symbol>SelectionRequest</symbol>
4578 events to the owner of a selection.
4579 The X server generates this event whenever a client
4580 requests a selection conversion by calling
4581 <xref linkend='XConvertSelection' xrefstyle='select: title'/>
4582 for the owned selection.
4586 The structure for this event type contains:
4590 <indexterm significance="preferred"><primary>XSelectionRequestEvent</primary></indexterm>
4592 <literallayout class="monospaced">
4596 int type; /* SelectionRequest */
4597 unsigned long serial; /* # of last request processed by server */
4598 Bool send_event; /* true if this came from a SendEvent request */
4599 Display *display; /* Display the event was read from */
4606 } XSelectionRequestEvent;
4612 The owner member is set to the window
4613 that was specified by the current owner in its
4614 <xref linkend='XSetSelectionOwner' xrefstyle='select: title'/>
4616 The requestor member is set to the window requesting the selection.
4617 The selection member is set to the atom that names the selection.
4618 For example, PRIMARY is used to indicate the primary selection.
4619 The target member is set to the atom that indicates the type
4620 the selection is desired in.
4621 The property member can be a property name or
4622 <symbol>None</symbol>.
4623 The time member is set to the timestamp or
4624 <symbol>CurrentTime</symbol>
4626 <systemitem>ConvertSelection</systemitem>
4631 The owner should convert the selection based on the specified target type
4633 <symbol>SelectionNotify</symbol>
4634 event back to the requestor.
4635 A <olink targetdoc='icccm'
4636 targetptr='Peer_to_Peer_Communication_by_Means_of_Selections'>complete
4637 specification for using selections</olink> is given in the X Consortium
4638 standard <citetitle>Inter-Client Communication Conventions Manual</citetitle>.
4641 <sect2 id="SelectionNotify_Events">
4642 <title>SelectionNotify Events</title>
4644 <!-- (SN SelectionNotify Events -->
4648 <indexterm><primary>Events</primary><secondary>SelectionNotify</secondary></indexterm>
4649 <indexterm significance="preferred"><primary>SelectionNotify</primary></indexterm>
4650 This event is generated by the X server in response to a
4651 <systemitem>ConvertSelection</systemitem>
4652 protocol request when there is no owner for the selection.
4653 When there is an owner, it should be generated by the owner
4654 of the selection by using
4655 <xref linkend='XSendEvent' xrefstyle='select: title'/>.
4656 The owner of a selection should send this event to a requestor when a selection
4657 has been converted and stored as a property
4658 or when a selection conversion could
4659 not be performed (which is indicated by setting the property member to
4660 <symbol>None</symbol>).
4665 <symbol>None</symbol>
4666 is specified as the property in the
4667 <systemitem>ConvertSelection</systemitem>
4668 protocol request, the owner should choose a property name,
4669 store the result as that property on the requestor window,
4671 <symbol>SelectionNotify</symbol>
4672 giving that actual property name.
4676 The structure for this event type contains:
4680 <indexterm significance="preferred"><primary>XSelectionEvent</primary></indexterm>
4682 <literallayout class="monospaced">
4686 int type; /* SelectionNotify */
4687 unsigned long serial; /* # of last request processed by server */
4688 Bool send_event; /* true if this came from a SendEvent request */
4689 Display *display; /* Display the event was read from */
4693 Atom property; /* atom or None */
4701 The requestor member is set to the window associated with
4702 the requestor of the selection.
4703 The selection member is set to the atom that indicates the selection.
4704 For example, PRIMARY is used for the primary selection.
4705 The target member is set to the atom that indicates the converted type.
4706 For example, PIXMAP is used for a pixmap.
4707 The property member is set to the atom that indicates which
4708 property the result was stored on.
4709 If the conversion failed,
4710 the property member is set to
4711 <symbol>None</symbol>.
4712 The time member is set to the time the conversion took place and
4713 can be a timestamp or
4714 <symbol>CurrentTime</symbol>.