&gi->alt_design[state] :
&gi->design[state]);
- XCopyArea(display, gd->pixmap, (direct ? window : drawto), gc,
+ XCopyArea(display, gd->pixmap, drawto, gc,
gd->x, gd->y, gi->width, gi->height, gi->x, gi->y);
+
+ if (direct)
+ XCopyArea(display, gd->pixmap, window, gc,
+ gd->x, gd->y, gi->width, gi->height, gi->x, gi->y);
+ else
+ redraw_mask |= REDRAW_ALL;
}
void MapGadget(struct GadgetInfo *gi)
{
+ if (gi == NULL)
+ return;
+
gi->mapped = TRUE;
DrawGadget(gi, (gi->state == GD_BUTTON_PRESSED), FALSE);
-
- redraw_mask |= REDRAW_ALL;
}
void UnmapGadget(struct GadgetInfo *gi)
{
+ if (gi == NULL)
+ return;
+
gi->mapped = FALSE;
}
DrawGadget(gi, TRUE, TRUE);
gi->state = GD_BUTTON_PRESSED;
gi->event.type = GD_EVENT_MOVING;
- gi->event.button = button;
if (gi->event_mask & GD_EVENT_MOVING)
gi->callback(gi);
{
gi->state = GD_BUTTON_UNPRESSED;
gi->event.type = GD_EVENT_RELEASED;
- gi->event.button = button;
DrawGadget(gi, FALSE, TRUE);
if (gi->event_mask & GD_EVENT_RELEASED)