Fixed predicate and minor propogation issue.

This commit is contained in:
Adam Harrison
2021-11-16 19:12:39 -05:00
parent c58029df8b
commit 18959aebef
3 changed files with 21 additions and 17 deletions
+7 -6
View File
@@ -1002,17 +1002,18 @@ function RootView:on_mouse_moved(x, y, dx, dy)
self.root_node:on_mouse_moved(x, y, dx, dy)
local node = self.root_node:get_child_overlapping_point(x, y)
self.overlapping_node = self.root_node:get_child_overlapping_point(x, y)
local div = self.root_node:get_divider_overlapping_point(x, y)
local tab_index = node and node:get_tab_overlapping_point(x, y)
if node and node:get_scroll_button_index(x, y) then
local tab_index = self.overlapping_node and self.overlapping_node:get_tab_overlapping_point(x, y)
if self.overlapping_node and self.overlapping_node:get_scroll_button_index(x, y) then
core.request_cursor("arrow")
elseif div then
core.request_cursor(div.type == "hsplit" and "sizeh" or "sizev")
elseif tab_index then
core.request_cursor("arrow")
elseif node then
core.request_cursor(node.active_view.cursor)
elseif self.overlapping_node then
core.request_cursor(self.overlapping_node.active_view.cursor)
end
end
@@ -1020,7 +1021,7 @@ end
function RootView:on_mouse_wheel(...)
local x, y = self.mouse.x, self.mouse.y
local node = self.root_node:get_child_overlapping_point(x, y)
node.active_view:on_mouse_wheel(...)
return node.active_view:on_mouse_wheel(...)
end