How can I send an expose event to a Drawing Area widget?
any other, come to that). I want to send an expose event so that it will redraw itself. [Last modified: Nov 97] Answer: Use the Xlib call XClearArea(XtDisplay(w), XtWindow(w), 0, 0, 0, 0, True) This clears the widget’s window and generates an expose event in doing so. The widgets expose action will then redraw it. This uses a round trip request. An alternative, without the round trip is from orca!mesa!rthomson@uunet.uu.net (Rich Thomson): Widget da; XmDrawingAreaCallbackStruct da_struct; da_struct.reason = XmCR_EXPOSE; da_struct.event = (XEvent *) NULL; da_struct.window = XtWindow(da); XtCallCallbacks(da, XmNexposeCallback, (XtPointer) &da_struct); Thanks to rand@ling.umu.se (Ola Andersson) for a correction to the above.