From: Po Lu Date: Mon, 28 Feb 2022 01:16:17 +0000 (+0000) Subject: Treat scroll bar information consistently on Haiku X-Git-Tag: emacs-29.0.90~2089 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0470ef007f268f19cad8c0c786559453c38fdde3;p=emacs.git Treat scroll bar information consistently on Haiku * src/haiku_support.cc (class EmacsScrollBar): New field `info'. (EmacsScrollBar): Obtain scroll bar info on initialization. (ButtonRegionFor): Use that information instead. --- diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 12990b3378d..20d04163fc9 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -1561,6 +1561,7 @@ public: bool horizontal; enum haiku_scroll_bar_part current_part; float old_value; + scroll_bar_info info; EmacsScrollBar (int x, int y, int x1, int y1, bool horizontal_p) : BScrollBar (BRect (x, y, x1, y1), NULL, NULL, 0, 0, horizontal_p ? @@ -1569,6 +1570,7 @@ public: BView *vw = (BView *) this; vw->SetResizingMode (B_FOLLOW_NONE); horizontal = horizontal_p; + get_scroll_bar_info (&info); } void @@ -1624,9 +1626,6 @@ public: BRect bounds; BRect rect; float button_size; - scroll_bar_info info; - - get_scroll_bar_info (&info); bounds = Bounds (); bounds.InsetBy (0.0, 0.0);