fix: uncalled for autohide timer triggering on init
This commit is contained in:
@@ -337,9 +337,11 @@ cursor = {
|
|||||||
autohide = function()
|
autohide = function()
|
||||||
if not cursor.on_primary_up and not Menu:is_open() then handle_mouse_leave() end
|
if not cursor.on_primary_up and not Menu:is_open() then handle_mouse_leave() end
|
||||||
end,
|
end,
|
||||||
autohide_timer = mp.add_timeout(mp.get_property_native('cursor-autohide') / 1000, function()
|
autohide_timer = (function()
|
||||||
cursor.autohide()
|
local timer = mp.add_timeout(mp.get_property_native('cursor-autohide') / 1000, function() cursor.autohide() end)
|
||||||
end),
|
timer:kill()
|
||||||
|
return timer
|
||||||
|
end)(),
|
||||||
queue_autohide = function()
|
queue_autohide = function()
|
||||||
if options.autohide and not cursor.on_primary_up then
|
if options.autohide and not cursor.on_primary_up then
|
||||||
cursor.autohide_timer:kill()
|
cursor.autohide_timer:kill()
|
||||||
|
@@ -108,7 +108,6 @@ end
|
|||||||
-- Disabled elements don't receive these events.
|
-- Disabled elements don't receive these events.
|
||||||
---@param name string Event name.
|
---@param name string Event name.
|
||||||
function Elements:proximity_trigger(name, ...)
|
function Elements:proximity_trigger(name, ...)
|
||||||
local stop_normal, stop_global = false, false
|
|
||||||
for i = #self.itable, 1, -1 do
|
for i = #self.itable, 1, -1 do
|
||||||
local element = self.itable[i]
|
local element = self.itable[i]
|
||||||
if element.enabled then
|
if element.enabled then
|
||||||
|
Reference in New Issue
Block a user