# To subscribers of the xforms list from Angus Leeming <a.leeming@ic.ac.uk> :
On Thursday 20 June 2002 12:06 pm, Angus Leeming wrote:
> On Thursday 20 June 2002 4:43 am, John Levon wrote:
> > How do I find out the actual exposed rectangle that needs drawing ?
> > The XEvent * xev is NULL when I get an FL_DRAW (xforms 1.0rc3)
> This looks like the relevant code path:
[snip...]
> So, the question becomes how do you get hold of the XEvent within
> redraw_marked? Add a globally accessible cache of key, xev that is set in
> fl_handle_form before calling fl_redraw_form ?
On further consideration, perhaps this would be more elegant:
void fl_handle_form(FL_FORM * form, int event, int key, XEvent * xev)
{
...
switch (event) {
case FL_DRAW: /* form must be redrawn */
fl_mark_for_redraw(form);
fl_redraw_marked(form, key, xev);
break;
...
}
void fl_mark_for_redraw(FL_FORM * form)
{
FL_OBJECT *ob;
for (ob = form->first; ob; ob = ob->next)
ob->redraw = 1;
}
void fl_redraw_marked(FL_FORM * form, int key, XEvent * xev)
{
...
ob = form->first;
...
for (; ob; ob = ob->next) {
if (ob->visible && ob->redraw-- > 0 &&
(!ob->is_child || ob->parent->visible)) {
fl_create_object_pixmap(ob);
...
fl_handle_object(ob, FL_DRAW, 0, 0, key, xev);
...
fl_show_object_pixmap(ob);
}
}
}
Best regards,
Angus
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Thu Jun 20 2002 - 08:29:56 EDT