void InsetCollapsable::InsetButtonPress(BufferView * bv,int x,int y,int button)
{
if (!collapsed && (x >= button_length)) {
- inset->InsetButtonPress(bv, x - widthCollapsed, y, button);
+ inset->InsetButtonPress(bv, x - widthCollapsed,
+ y + (top_baseline - inset->y()),
+ button);
}
}
bv->updateInset(this, false);
}
} else if (!collapsed && (x >= button_length) && (y >= button_top_y)) {
- inset->InsetButtonRelease(bv, x - widthCollapsed, y, button);
+ inset->InsetButtonRelease(bv, x - widthCollapsed,
+ y + (top_baseline - inset->y()),
+ button);
}
}
int x, int y, int state)
{
if (x >= button_length) {
- inset->InsetMotionNotify(bv, x-widthCollapsed, y, state);
+ inset->InsetMotionNotify(bv, x-widthCollapsed,
+ y + (top_baseline - inset->y()),
+ state);
}
}