haiku_write (SCROLL_BAR_DRAG_EVENT, &rq);
BScrollBar::MouseUp (pt);
}
+
+ void
+ MouseMoved (BPoint point, uint32 transit, const BMessage *msg)
+ {
+ struct haiku_menu_bar_left_event rq;
+ BPoint conv;
+
+ if (transit == B_EXITED_VIEW)
+ {
+ conv = ConvertToParent (point);
+
+ rq.x = std::lrint (conv.x);
+ rq.y = std::lrint (conv.y);
+ rq.window = this->Window ();
+
+ if (movement_locker.Lock ())
+ {
+ haiku_write (MENU_BAR_LEFT, &rq);
+ movement_locker.Unlock ();
+ }
+ }
+
+ BScrollBar::MouseMoved (point, transit, msg);
+ }
};
class EmacsTitleMenuItem : public BMenuItem
}
}
+bool
+BView_inside_scroll_bar (void *view, int x, int y)
+{
+ EmacsView *vw = (EmacsView *) view;
+ bool val;
+
+ if (vw->LockLooper ())
+ {
+ val = vw->sb_region.Contains (BPoint (x, y));
+ vw->UnlockLooper ();
+ }
+ else
+ val = false;
+
+ return val;
+}
+
void
BView_get_mouse (void *view, int *x, int *y)
{
extern void
BView_forget_scroll_bar (void *view, int x, int y, int width, int height);
+ extern bool
+ BView_inside_scroll_bar (void *view, int x, int y);
+
extern void
BView_get_mouse (void *view, int *x, int *y);
need_flush = 1;
}
- if (f->auto_lower && !popup_activated_p)
+ if (f->auto_lower && !popup_activated_p
+ /* Don't do this if the mouse entered a scroll bar. */
+ && !BView_inside_scroll_bar (FRAME_HAIKU_VIEW (f),
+ b->x, b->y))
{
/* If we're leaving towards the menu bar, don't
auto-lower here, and wait for a exit