comparison src/ExternalClient-Xlib.c @ 2108:8de911beca70

[xemacs-hg @ 2004-06-02 09:16:14 by didierv] C++ related fixes
author didierv
date Wed, 02 Jun 2004 09:16:21 +0000
parents 376386a54a3c
children 2aa9cd456ae7
comparison
equal deleted inserted replaced
2107:91e93aba4aae 2108:8de911beca70
57 do 57 do
58 { 58 {
59 Status st; 59 Status st;
60 Window root_win, parent_win; 60 Window root_win, parent_win;
61 Window *child_win; 61 Window *child_win;
62 int nchild; 62 unsigned int nchild;
63 63
64 st = XQueryTree(display, win, &root_win, &parent_win, &child_win, 64 st = XQueryTree (display, win, &root_win, &parent_win, &child_win,
65 &nchild); 65 &nchild);
66 if (!st) 66 if (!st)
67 return False; 67 return False;
68 XFree((XPointer)child_win); 68 XFree((XPointer)child_win);
69 if (parent_win == focuswin) 69 if (parent_win == focuswin)
70 return True; 70 return True;
73 win = parent_win; 73 win = parent_win;
74 } 74 }
75 while (1); 75 while (1);
76 } 76 }
77 77
78 78
79 /* External entry points when using XLib directly */ 79 /* External entry points when using XLib directly */
80 80
81 void ExternalClientInitialize (Display *display, Window win); 81 void ExternalClientInitialize (Display *display, Window win);
82 void 82 void
83 ExternalClientInitialize (Display *display, Window win) 83 ExternalClientInitialize (Display *display, Window win)
98 void 98 void
99 ExternalClientEventHandler (Display *display, Window win, XEvent *event) 99 ExternalClientEventHandler (Display *display, Window win, XEvent *event)
100 { 100 {
101 if (win != event->xany.window) 101 if (win != event->xany.window)
102 return; 102 return;
103 103
104 if (event->type == ClientMessage && 104 if (event->type == ClientMessage &&
105 event->xclient.message_type == a_EXTW_NOTIFY && 105 event->xclient.message_type == a_EXTW_NOTIFY &&
106 event->xclient.data.l[0] == extw_shell_send) 106 event->xclient.data.l[0] == extw_shell_send)
107 switch (event->xclient.data.l[1]) { 107 switch (event->xclient.data.l[1]) {
108 case extw_notify_gm: 108 case extw_notify_gm:
109 /* for the moment, just refuse geometry requests. */ 109 /* for the moment, just refuse geometry requests. */
110 extw_send_notify_3(display, win, extw_notify_gm, XtGeometryNo, 0, 0); 110 extw_send_notify_3(display, win, extw_notify_gm, XtGeometryNo, 0, 0);
111 break; 111 break;
112 112
113 case extw_notify_init: 113 case extw_notify_init:
114 extw_send_notify_3(display, win, extw_notify_init, EXTW_TYPE_XLIB, 0, 0); 114 extw_send_notify_3(display, win, extw_notify_init, EXTW_TYPE_XLIB, 0, 0);
115 break; 115 break;
116 116
117 case extw_notify_end: 117 case extw_notify_end:
118 XClearArea(display, win, 0, 0, 0, 0, True); 118 XClearArea(display, win, 0, 0, 0, 0, True);
119 break; 119 break;
120 } 120 }
121 else 121 else