Mercurial > hg > xemacs-beta
comparison lwlib/lwlib-utils.c @ 165:5a88923fcbfe r20-3b9
Import from CVS: tag r20-3b9
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:44:42 +0200 |
parents | 6b37e6ddd302 |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
164:4e0740e5aab2 | 165:5a88923fcbfe |
---|---|
34 /* Redisplay the contents of the widget, without first clearing it. */ | 34 /* Redisplay the contents of the widget, without first clearing it. */ |
35 void | 35 void |
36 XtNoClearRefreshWidget (Widget widget) | 36 XtNoClearRefreshWidget (Widget widget) |
37 { | 37 { |
38 XEvent event; | 38 XEvent event; |
39 XExposeEvent* ev = &event.xexpose; | |
39 | 40 |
40 event.type = Expose; | 41 ev->type = Expose; |
41 event.xexpose.serial = 0; | 42 ev->serial = 0; |
42 event.xexpose.send_event = 0; | 43 ev->send_event = 0; |
43 event.xexpose.display = XtDisplay (widget); | 44 ev->display = XtDisplay (widget); |
44 event.xexpose.window = XtWindow (widget); | 45 ev->window = XtWindow (widget); |
45 event.xexpose.x = 0; | 46 ev->x = 0; |
46 event.xexpose.y = 0; | 47 ev->y = 0; |
47 event.xexpose.width = widget->core.width; | 48 ev->width = widget->core.width; |
48 event.xexpose.height = widget->core.height; | 49 ev->height = widget->core.height; |
49 event.xexpose.count = 0; | 50 ev->count = 0; |
50 | 51 |
51 (*widget->core.widget_class->core_class.expose) | 52 (*widget->core.widget_class->core_class.expose) |
52 (widget, &event, (Region)NULL); | 53 (widget, &event, (Region)NULL); |
53 } | 54 } |
54 | 55 |
61 { | 62 { |
62 if (XtIsComposite (w)) | 63 if (XtIsComposite (w)) |
63 { | 64 { |
64 CompositeWidget cw = (CompositeWidget) w; | 65 CompositeWidget cw = (CompositeWidget) w; |
65 /* We have to copy the children list before mapping over it, because | 66 /* We have to copy the children list before mapping over it, because |
66 the procedure might add/delete elements, which would lose badly. | 67 the procedure might add/delete elements, which would lose badly. */ |
67 */ | |
68 int nkids = cw->composite.num_children; | 68 int nkids = cw->composite.num_children; |
69 Widget *kids = (Widget *) malloc (sizeof (Widget) * nkids); | 69 Widget *kids = (Widget *) malloc (sizeof (Widget) * nkids); |
70 int i; | 70 int i; |
71 memcpy (kids, cw->composite.children, sizeof (Widget) * nkids); | 71 memcpy (kids, cw->composite.children, sizeof (Widget) * nkids); |
72 for (i = 0; i < nkids; i++) | 72 for (i = 0; i < nkids; i++) |