1288ee7e1318b30c1369529ac37b7afc45781590
[adaptation/xorg/driver/xserver-xorg-module-xdbg.git] / common / xdbg_evlog_core.c
1 /**************************************************************************
2
3 xdbg
4
5 Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
6
7 Contact: Boram Park <boram1288.park@samsung.com>
8          Sangjin LEE <lsj119@samsung.com>
9
10 Permission is hereby granted, free of charge, to any person obtaining a
11 copy of this software and associated documentation files (the
12 "Software"), to deal in the Software without restriction, including
13 without limitation the rights to use, copy, modify, merge, publish,
14 distribute, sub license, and/or sell copies of the Software, and to
15 permit persons to whom the Software is furnished to do so, subject to
16 the following conditions:
17
18 The above copyright notice and this permission notice (including the
19 next paragraph) shall be included in all copies or substantial portions
20 of the Software.
21
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
25 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
26 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
27 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30 **************************************************************************/
31
32 #ifdef HAVE_CONFIG_H
33 #include "config.h"
34 #endif
35
36 #include <stdio.h>
37 #include <string.h>
38 #include <strings.h>
39 #include <sys/types.h>
40 #include <sys/fcntl.h>
41 #include <unistd.h>
42 #include <stdarg.h>
43 #include <fcntl.h>
44 #include <unistd.h>
45
46 #include <dix.h>
47 #define XREGISTRY
48 #include <registry.h>
49 #include <xace.h>
50 #include <xacestr.h>
51 #include <X11/Xatom.h>
52 #include <X11/Xlib.h>
53 #include <windowstr.h>
54 #include <X11/extensions/XI2proto.h>
55
56 #include "xdbg_types.h"
57 #include "xdbg_evlog_core.h"
58 #include "xdbg_evlog.h"
59
60 char * xDbgEvlogRequestCore (EvlogInfo *evinfo, char *reply, int *len)
61 {
62     xReq *req = evinfo->req.ptr;
63
64     switch (req->reqType)
65     {
66     case X_CreateWindow:
67         {
68             xCreateWindowReq *stuff = (xCreateWindowReq *)req;
69
70             REPLY (": Window(0x%lx) Parent(0x%lx) size(%dx%d) boaderWid(%d) coordinate(%d,%d)",
71                 stuff->wid,
72                 stuff->parent,
73                 stuff->width,
74                 stuff->height,
75                 stuff->borderWidth,
76                 stuff->x,
77                 stuff->y);
78
79             return reply;
80         }
81
82     case X_ChangeWindowAttributes:
83         {
84             xChangeWindowAttributesReq *stuff = (xChangeWindowAttributesReq *)req;
85             REPLY (": XID(0x%lx)",
86                 stuff->window);
87
88             return reply;
89         }
90
91     case X_ChangeSaveSet:
92         {
93             xChangeSaveSetReq *stuff = (xChangeSaveSetReq *)req;
94             REPLY (": XID(0x%lx)",
95                 stuff->window);
96
97             return reply;
98         }
99
100     case X_ReparentWindow:
101         {
102             xReparentWindowReq *stuff = (xReparentWindowReq *)req;
103             REPLY (": Window(0x%lx) Parent(0x%lx) coord(%d,%d)",
104                 stuff->window,
105                 stuff->parent,
106                 stuff->x,
107                 stuff->y);
108
109             return reply;
110         }
111
112     case X_ConfigureWindow:
113         {
114             xConfigureWindowReq *stuff = (xConfigureWindowReq *)req;
115             REPLY (": XID(0x%lx)",
116                 stuff->window);
117
118             return reply;
119         }
120
121     case X_CirculateWindow:
122         {
123             xCirculateWindowReq *stuff = (xCirculateWindowReq *)req;
124             REPLY (": XID(0x%lx)",
125                 stuff->window);
126
127             return reply;
128         }
129
130     case X_ChangeProperty:
131         {
132             xChangePropertyReq *stuff = (xChangePropertyReq *)req;
133             REPLY (": XID(0x%lx)",
134                 stuff->window);
135
136             REPLY (" Property");
137             reply = xDbgGetAtom(stuff->property, evinfo, reply, len);
138
139             REPLY (" Type");
140             reply = xDbgGetAtom(stuff->type, evinfo, reply, len);
141
142             return reply;
143         }
144
145     case X_DeleteProperty:
146         {
147             xDeletePropertyReq *stuff = (xDeletePropertyReq *)req;
148             REPLY (": XID(0x%lx)",
149                 stuff->window);
150
151             REPLY (" Property");
152             reply = xDbgGetAtom(stuff->property, evinfo, reply, len);
153
154             return reply;
155         }
156
157     case X_SetSelectionOwner:
158         {
159             xSetSelectionOwnerReq *stuff = (xSetSelectionOwnerReq *)req;
160             REPLY (": XID(0x%lx)",
161                 stuff->window);
162
163             REPLY (" Selection");
164             reply = xDbgGetAtom(stuff->selection, evinfo, reply, len);
165
166             return reply;
167         }
168
169     case X_ConvertSelection:
170         {
171             xConvertSelectionReq *stuff = (xConvertSelectionReq *)req;
172             REPLY (": XID(0x%lx)",
173                 stuff->requestor);
174
175             REPLY (" Selection");
176             reply = xDbgGetAtom(stuff->selection, evinfo, reply, len);
177             REPLY (" Target");
178             reply = xDbgGetAtom(stuff->target, evinfo, reply, len);
179             REPLY (" Property");
180             reply = xDbgGetAtom(stuff->property, evinfo, reply, len);
181
182             return reply;
183         }
184
185     case X_SendEvent:
186         {
187             xSendEventReq *stuff = (xSendEventReq *)req;
188             REPLY (": XID(0x%lx)",
189                 stuff->destination);
190
191             return reply;
192         }
193
194     case X_GrabPointer:
195         {
196             xGrabPointerReq *stuff = (xGrabPointerReq *)req;
197             REPLY (": XID(0x%lx) ConfineTo(0x%lx) Cursor(0x%lx)",
198                 stuff->grabWindow,
199                 stuff->confineTo,
200                 stuff->cursor);
201
202             return reply;
203         }
204
205     case X_GrabButton:
206         {
207             xGrabButtonReq *stuff = (xGrabButtonReq *)req;
208             REPLY (": XID(0x%lx) ConfineTo(0x%lx) Cursor(0x%lx)",
209                 stuff->grabWindow,
210                 stuff->confineTo,
211                 stuff->cursor);
212
213             return reply;
214         }
215
216     case X_UngrabButton:
217         {
218             xUngrabButtonReq *stuff = (xUngrabButtonReq *)req;
219             REPLY (": XID(0x%lx)",
220                 stuff->grabWindow);
221
222             return reply;
223         }
224
225     case X_ChangeActivePointerGrab:
226         {
227             xChangeActivePointerGrabReq *stuff = (xChangeActivePointerGrabReq *)req;
228             REPLY (": Cursor(0x%lx)",
229                 stuff->cursor);
230
231             return reply;
232         }
233
234     case X_GrabKeyboard:
235         {
236             xGrabKeyboardReq *stuff = (xGrabKeyboardReq *)req;
237             REPLY (": XID(0x%lx)",
238                 stuff->grabWindow);
239
240             return reply;
241         }
242
243     case X_GrabKey:
244         {
245             xGrabKeyReq *stuff = (xGrabKeyReq *)req;
246             REPLY (": XID(0x%lx)",
247                 stuff->grabWindow);
248
249             return reply;
250         }
251
252     case X_UngrabKey:
253         {
254             xUngrabKeyReq *stuff = (xUngrabKeyReq *)req;
255             REPLY (": XID(0x%lx)",
256                 stuff->grabWindow);
257
258             return reply;
259         }
260
261     case X_SetInputFocus:
262         {
263             xSetInputFocusReq *stuff = (xSetInputFocusReq *)req;
264             REPLY (": XID(0x%lx)",
265                 stuff->focus);
266
267             return reply;
268         }
269
270     case X_CreatePixmap:
271         {
272             xCreatePixmapReq *stuff = (xCreatePixmapReq *)req;
273             REPLY (": Pixmap(0x%lx) Drawable(0x%lx) size(%dx%d)",
274                 stuff->pid,
275                 stuff->drawable,
276                 stuff->width,
277                 stuff->height);
278
279             return reply;
280         }
281
282     case X_ClearArea:
283         {
284             xClearAreaReq *stuff = (xClearAreaReq *)req;
285             REPLY (": XID(0x%lx) area(%d,%d %dx%d)",
286                 stuff->window,
287                 stuff->x,
288                 stuff->y,
289                 stuff->width,
290                 stuff->height);
291
292         \r   return reply;
293         }
294
295     case X_CopyArea:
296         {
297             xCopyAreaReq *stuff = (xCopyAreaReq *)req;
298             REPLY (": srcXID(0x%lx) dstXID(0x%lx) gc(0x%lx) size(%dx%d) src(%d,%d) dst(%d,%d)",
299                 stuff->srcDrawable,
300                 stuff->dstDrawable,
301                 stuff->gc,
302                 stuff->width,
303                 stuff->height,
304                 stuff->srcX,
305                 stuff->srcY,
306                 stuff->dstX,
307                 stuff->dstY);
308
309             return reply;
310         }
311
312     case X_CopyPlane:
313         {
314             xCopyPlaneReq *stuff = (xCopyPlaneReq *)req;
315             REPLY (": srcXID(0x%lx) dstXID(0x%lx) gc(0x%lx) size(%dx%d) src(%d,%d) dst(%d,%d)",
316                 stuff->srcDrawable,
317                 stuff->dstDrawable,
318                 stuff->gc,
319                 stuff->width,
320                 stuff->height,
321                 stuff->srcX,
322                 stuff->srcY,
323                 stuff->dstX,
324                 stuff->dstY);
325
326             return reply;
327         }
328
329     case X_PolyPoint:
330         {
331             xPolyPointReq *stuff = (xPolyPointReq *)req;
332             REPLY (": XID(0x%lx) gc(0x%lx)",
333                 stuff->drawable,
334                 stuff->gc);
335
336             return reply;
337         }
338
339     case X_PolyLine:
340         {
341             xPolyLineReq *stuff = (xPolyLineReq *)req;
342             REPLY (": XID(0x%lx gc(0x%lx)",
343                 stuff->drawable,
344                 stuff->gc);
345
346             return reply;
347         }
348
349     case X_PolySegment:
350         {
351             xPolySegmentReq *stuff = (xPolySegmentReq *)req;
352             REPLY (": XID(0x%lx) gc(0x%lx)",
353                 stuff->drawable,
354                 stuff->gc);
355
356             return reply;
357         }
358
359     case X_PolyRectangle:
360         {
361             xPolyRectangleReq *stuff = (xPolyRectangleReq *)req;
362             REPLY (": XID(0x%lx) gc(0x%lx)",
363                 stuff->drawable,
364                 stuff->gc);
365
366             return reply;
367         }
368
369     case X_PolyArc:
370         {
371             xPolyArcReq *stuff = (xPolyArcReq *)req;
372             REPLY (": XID(0x%lx) gc(0x%lx)",
373                 stuff->drawable,
374                 stuff->gc);
375
376             return reply;
377         }
378
379     case X_FillPoly:
380         {
381             xFillPolyReq *stuff = (xFillPolyReq *)req;
382             REPLY (": XID(0x%lx) gc(0x%lx)",
383                 stuff->drawable,
384                 stuff->gc);
385
386             return reply;
387         }
388
389     case X_PolyFillRectangle:
390         {
391             xPolyFillRectangleReq *stuff = (xPolyFillRectangleReq *)req;
392             REPLY (": XID(0x%lx) gc(0x%lx)",
393                 stuff->drawable,
394                 stuff->gc);
395
396             return reply;
397         }
398
399     case X_PolyFillArc:
400         {
401             xPolyFillArcReq *stuff = (xPolyFillArcReq *)req;
402             REPLY (": XID(0x%lx) gc(0x%lx)",
403                 stuff->drawable,
404                 stuff->gc);
405
406             return reply;
407         }
408
409     case X_PutImage:
410         {
411             xPutImageReq *stuff = (xPutImageReq *)req;
412             REPLY (": XID(0x%lx) gc(0x%lx) size(%dx%d) dst(%d,%d)",
413                 stuff->drawable,
414                 stuff->gc,
415                 stuff->width,
416                 stuff->height,
417                 stuff->dstX,
418                 stuff->dstY);
419             return reply;
420         }
421
422     case X_GetImage:
423         {
424             xGetImageReq *stuff = (xGetImageReq *)req;
425             REPLY (": XID(0x%lx) size(%dx%d) dst(%d,%d)",
426                 stuff->drawable,
427                 stuff->width,
428                 stuff->height,
429                 stuff->x,
430                 stuff->y);
431
432             return reply;
433         }
434
435     case X_PolyText8:
436         {
437             xPolyText8Req *stuff = (xPolyText8Req *)req;
438             REPLY (": XID(0x%lx) gc(0x%lx) coord(%d,%d)",
439                 stuff->drawable,
440                 stuff->gc,
441                 stuff->x,
442                 stuff->y);
443
444             return reply;
445         }
446
447     case X_PolyText16:
448         {
449             xPolyText16Req *stuff = (xPolyText16Req *)req;
450             REPLY (": XID(0x%lx) gc(0x%lx) coord(%d,%d)",
451                 stuff->drawable,
452                 stuff->gc,
453                 stuff->x,
454                 stuff->y);
455
456             return reply;
457         }
458
459     case X_ImageText8:
460         {
461             xImageText8Req *stuff = (xImageText8Req *)req;
462             REPLY (": XID(0x%lx) gc(0x%lx) coord(%d,%d)",
463                 stuff->drawable,
464                 stuff->gc,
465                 stuff->x,
466                 stuff->y);
467
468             return reply;
469         }
470
471     case X_ImageText16:
472         {
473             xImageText16Req *stuff = (xImageText16Req *)req;
474             REPLY (": XID(0x%lx) gc(0x%lx) coord(%d,%d)",
475                 stuff->drawable,
476                 stuff->gc,
477                 stuff->x,
478                 stuff->y);
479
480             return reply;
481         }
482
483     case X_ChangeKeyboardMapping:
484         {
485             xChangeKeyboardMappingReq *stuff = (xChangeKeyboardMappingReq *)req;
486             REPLY (": Key(%d) FstKey(%d) KeySyms(%d)",
487                 stuff->firstKeyCode,
488                 stuff->keyCodes,
489                 stuff->keySymsPerKeyCode);
490
491             return reply;
492         }
493
494     case X_GetKeyboardMapping:
495         {
496             xGetKeyboardMappingReq *stuff = (xGetKeyboardMappingReq *)req;
497             REPLY (": FstKey(%d) Count(%d)",
498                 stuff->firstKeyCode,
499                 stuff->count);
500
501             return reply;
502         }
503
504     case X_ChangePointerControl:
505         {
506             xChangePointerControlReq *stuff = (xChangePointerControlReq *)req;
507             REPLY (": accelNum(%d) accelDenum(%d) threshold(%d)",
508                 stuff->accelNum,
509                 stuff->accelDenum,
510                 stuff->threshold);
511
512             return reply;
513         }
514
515     case X_SetPointerMapping:
516         {
517             xSetPointerMappingReq *stuff = (xSetPointerMappingReq *)req;
518             REPLY (": Elts(%d)",
519                 stuff->nElts);
520
521             return reply;
522         }
523
524     case X_SetModifierMapping:
525         {
526             xSetModifierMappingReq *stuff =(xSetModifierMappingReq *)req;
527             REPLY (": NumkeyPerModifier(%d)",
528                 stuff->numKeyPerModifier);
529
530             return reply;
531         }
532
533     case X_DestroyWindow:
534     case X_DestroySubwindows:
535     case X_MapWindow:
536     case X_MapSubwindows:
537     case X_UnmapWindow:
538     case X_UnmapSubwindows:
539     case X_GetGeometry:
540     case X_QueryTree:
541     case X_UngrabPointer:
542     case X_UngrabKeyboard:
543     case X_FreePixmap:
544     case X_KillClient:
545         {
546             xResourceReq *stuff = (xResourceReq *)req;
547             REPLY (": XID(0x%lx)",
548                 stuff->id);
549
550             return reply;
551         }
552
553     default:
554             break;
555     }
556
557     return reply;
558 }
559
560
561 char * xDbgEvlogEventCore (EvlogInfo *evinfo, char *reply, int *len)
562 {
563     xEvent *evt = evinfo->evt.ptr;
564
565     switch (evt->u.u.type & 0x7F)
566     {
567     case KeyPress:
568     case KeyRelease:
569     case ButtonPress:
570     case ButtonRelease:
571     case MotionNotify:
572         {
573             REPLY (": Root(0x%lx %d,%d) Event(0x%lx %d,%d) Child(0x%lx)",
574                 evt->u.keyButtonPointer.root,
575                 evt->u.keyButtonPointer.rootX,
576                 evt->u.keyButtonPointer.rootY,
577                 evt->u.keyButtonPointer.event,
578                 evt->u.keyButtonPointer.eventX,
579                 evt->u.keyButtonPointer.eventY,
580                 evt->u.keyButtonPointer.child);
581
582             return reply;
583                 }
584
585     case EnterNotify:
586     case LeaveNotify:
587         {
588             REPLY (": Root(0x%lx %d,%d) Event(0x%lx %d,%d) Child(0x%lx)",
589                 evt->u.enterLeave.root,
590                 evt->u.enterLeave.rootX,
591                 evt->u.enterLeave.rootY,
592                 evt->u.enterLeave.event,
593                 evt->u.enterLeave.eventX,
594                 evt->u.enterLeave.eventY,
595                 evt->u.enterLeave.child);
596
597             return reply;
598                 }
599
600     case FocusIn:
601     case FocusOut:
602     case KeymapNotify:
603         {
604             REPLY (": XID(0x%lx)",
605                 evt->u.focus.window);
606
607             return reply;
608                 }
609
610     case Expose:
611         {
612             REPLY (": XID(0x%lx) size(%dx%d) coord(%d,%d)",
613                 evt->u.expose.window,
614                 evt->u.expose.width,
615                 evt->u.expose.height,
616                 evt->u.expose.x,
617                 evt->u.expose.y);
618
619             return reply;
620                 }
621
622     case GraphicsExpose:
623         {
624             REPLY (": XID(0x%lx) size(%dx%d) coord(%d,%d)",
625                 evt->u.graphicsExposure.drawable,
626                 evt->u.graphicsExposure.width,
627                 evt->u.graphicsExposure.height,
628                 evt->u.graphicsExposure.x,
629                 evt->u.graphicsExposure.y);
630
631             return reply;
632                 }
633
634     case NoExpose:
635         {
636             REPLY (": XID(0x%lx)",
637                 evt->u.noExposure.drawable);
638
639             return reply;
640                 }
641
642
643     case VisibilityNotify:
644         {
645             REPLY (": XID(0x%lx)",
646                 evt->u.visibility.window);
647
648             return reply;
649                 }
650
651     case CreateNotify:
652         {
653             REPLY (": Window(0x%lx) Parent(0x%lx) size(%dx%d) coord(%d,%d) borderWidth(%d)",
654                 evt->u.createNotify.window,
655                 evt->u.createNotify.parent,
656                 evt->u.createNotify.width,
657                 evt->u.createNotify.height,
658                 evt->u.createNotify.x,
659                 evt->u.createNotify.y,
660                 evt->u.createNotify.borderWidth);
661
662             return reply;
663                 }
664
665     case DestroyNotify:
666         {
667             REPLY (": Window(0x%lx) Event(0x%lx)",
668                 evt->u.destroyNotify.window,
669                 evt->u.destroyNotify.event);
670
671             return reply;
672                 }
673
674     case UnmapNotify:
675         {
676             REPLY (": Window(0x%lx) Event(0x%lx)",
677                 evt->u.unmapNotify.window,
678                 evt->u.unmapNotify.event);
679
680             return reply;
681                 }
682
683     case MapNotify:
684         {
685             REPLY (": Window(0x%lx) Event(0x%lx)",
686                 evt->u.mapNotify.window,
687                 evt->u.mapNotify.event);
688
689             return reply;
690                 }
691
692     case MapRequest:
693         {
694             REPLY (": Window(0x%lx) Parent(0x%lx)",
695                 evt->u.mapRequest.window,
696                 evt->u.mapRequest.parent);
697
698             return reply;
699                 }
700
701     case ReparentNotify:
702         {
703             REPLY (": Window(0x%lx) Event(0x%lx) parent(0x%lx) coord(%d,%d)",
704                 evt->u.reparent.window,
705                 evt->u.reparent.event,
706                 evt->u.reparent.parent,
707                 evt->u.reparent.x,
708                 evt->u.reparent.y);
709
710             return reply;
711                 }
712
713     case ConfigureNotify:
714         {
715             REPLY (": Window(0x%lx) Event(0x%lx) aboveSibling(0x%lx) size(%dx%d) coord(%d,%d) borderWidth(%d)",
716                 evt->u.configureNotify.window,
717                 evt->u.configureNotify.event,
718                 evt->u.configureNotify.aboveSibling,
719                 evt->u.configureNotify.width,
720                 evt->u.configureNotify.height,
721                 evt->u.configureNotify.x,
722                 evt->u.configureNotify.y,
723                 evt->u.configureNotify.borderWidth);
724
725             return reply;
726                 }
727
728     case ConfigureRequest:
729         {
730             REPLY (": Window(0x%lx) Parent(0x%lx) Sibling(0x%lx) size(%dx%d) coord(%d,%d) borderWidth(%d)",
731                 evt->u.configureRequest.window,
732                 evt->u.configureRequest.parent,
733                 evt->u.configureRequest.sibling,
734                 evt->u.configureRequest.width,
735                 evt->u.configureRequest.height,
736                 evt->u.configureRequest.x,
737                 evt->u.configureRequest.y,
738                 evt->u.configureRequest.borderWidth);
739
740             return reply;
741                 }
742
743     case GravityNotify:
744         {
745             REPLY (": Window(0x%lx) Event(0x%lx) coord(%d,%d)",
746                 evt->u.gravity.window,
747                 evt->u.gravity.event,
748                 evt->u.gravity.x,
749                 evt->u.gravity.y);
750
751             return reply;
752                 }
753
754     case ResizeRequest:
755         {
756             REPLY (": Window(0x%lx) size(%dx%d)",
757                 evt->u.resizeRequest.window,
758                 evt->u.resizeRequest.width,
759                 evt->u.resizeRequest.height);
760
761             return reply;
762                 }
763
764     case CirculateNotify:
765     case CirculateRequest:
766         {
767             REPLY (": Window(0x%lx) Event(0x%lx) parent(0x%lx)",
768                 evt->u.circulate.window,
769                 evt->u.circulate.event,
770                 evt->u.circulate.parent);
771
772             return reply;
773                 }
774
775     case PropertyNotify:
776         {
777             REPLY (": Window(0x%lx)",
778                 evt->u.property.window);
779
780             REPLY (" Atom");
781             reply = xDbgGetAtom(evt->u.property.atom, evinfo, reply, len);
782
783             return reply;
784                 }
785
786     case SelectionClear:
787         {
788             REPLY (": Window(0x%lx)",
789                 evt->u.selectionClear.window);
790
791             REPLY (" Atom");
792             reply = xDbgGetAtom(evt->u.selectionClear.atom, evinfo, reply, len);
793
794             return reply;
795                 }
796
797     case SelectionRequest:
798         {
799             REPLY (": Owner(0x%lx) Requestor(0x%lx)",
800                 evt->u.selectionRequest.owner,
801                 evt->u.selectionRequest.requestor);
802
803             REPLY (" selection");
804             reply = xDbgGetAtom(evt->u.selectionRequest.selection, evinfo, reply, len);
805             REPLY (" Target");
806             reply = xDbgGetAtom(evt->u.selectionRequest.target, evinfo, reply, len);
807             REPLY (" Property");
808             reply = xDbgGetAtom(evt->u.selectionRequest.property, evinfo, reply, len);
809
810             return reply;
811                 }
812
813     case SelectionNotify:
814         {
815             REPLY (": Requestor(0x%lx)",
816                 evt->u.selectionNotify.requestor);
817
818             REPLY (" selection");
819             reply = xDbgGetAtom(evt->u.selectionNotify.selection, evinfo, reply, len);
820             REPLY (" Target");
821             reply = xDbgGetAtom(evt->u.selectionNotify.target, evinfo, reply, len);
822             REPLY (" Property");
823             reply = xDbgGetAtom(evt->u.selectionNotify.property, evinfo, reply, len);
824
825             return reply;
826                 }
827
828     case ColormapNotify:
829         {
830             REPLY (": XID(0x%lx) Colormap(0x%lx)",
831                 evt->u.colormap.window,
832                 evt->u.colormap.colormap);
833
834             return reply;
835                 }
836
837     case ClientMessage:
838         {
839             REPLY (": XID(0x%lx)",
840                 evt->u.clientMessage.window);
841
842             REPLY (" Type");
843             reply = xDbgGetAtom(evt->u.clientMessage.u.b.type, evinfo, reply, len);
844
845             return reply;
846                 }
847
848     case MappingNotify:
849     case GenericEvent:
850     default:
851             break;
852     }
853
854     return reply;
855 }