- int yy = ascent(bv, font) + y -
- (ascent_collapsed() +
- descent_collapsed() +
- inset.ascent(bv, font));
- inset.insetButtonRelease(bv, x, yy, button);
+ int yy = ascent(bv, font) + y - inset.ascent(bv, font);
+
+ // inlined is special - the text appears above
+ // button_bottom_y
+ if (status_ == Inlined) {
+ inset.insetButtonRelease(bv, x, yy, button);
+ } else if (!collapsed_ && (y > button_bottom_y)) {
+ yy -= (ascent_collapsed() + descent_collapsed());
+ inset.insetButtonRelease(bv, x, yy, button);
+ }
+ }
+ return false;
+}
+
+
+void InsetERT::insetMotionNotify(BufferView * bv,
+ int x, int y, int state)
+{
+ if (status_ == Inlined) {
+ inset.insetMotionNotify(bv, x, y, state);
+ } else {
+ InsetCollapsable::insetMotionNotify(bv, x, y, state);