Merge branch 'enhanced_viewport_overlay' into jgrpp

This commit is contained in:
Jonathan G Rennison
2018-05-26 09:15:08 +01:00
4 changed files with 53 additions and 15 deletions

View File

@@ -75,6 +75,7 @@ int _scrollbar_size;
byte _scroller_click_timeout = 0;
Window *_scrolling_viewport; ///< A viewport is being scrolled with the mouse.
Rect _scrolling_viewport_bound; ///< A viewport is being scrolled with the mouse, the overlay currently covers this viewport rectangle.
bool _mouse_hovering; ///< The mouse is hovering over the same point.
SpecialMouseMode _special_mouse_mode; ///< Mode of the mouse.
@@ -1880,6 +1881,7 @@ void InitWindowSystem()
_mouseover_last_w = NULL;
_last_scroll_window = NULL;
_scrolling_viewport = NULL;
_scrolling_viewport_bound = { 0, 0, 0, 0 };
_mouse_hovering = false;
NWidgetLeaf::InvalidateDimensionCache(); // Reset cached sizes of several widgets.
@@ -2450,6 +2452,7 @@ static EventState HandleViewportScroll()
_cursor.fix_at = false;
_scrolling_viewport = NULL;
_last_scroll_window = NULL;
UpdateActiveScrollingViewport(nullptr);
return ES_NOT_HANDLED;
}