more debug logging

This commit is contained in:
2023-07-27 11:35:54 +00:00
parent 8998e63123
commit 80b767e966
3 changed files with 8 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
msg = require('mp.msg')
local Element = require('elements/Element')
--[[ MuteButton ]]
@@ -73,7 +74,9 @@ function VolumeSlider:render()
if width <= 0 or height <= 0 or visibility <= 0 then return end
msg.trace("VolumeSlider: proximity_raw:", self.proximity_raw)
if self.proximity_raw == 0 then
msg.trace("VolumeSlider: setting on_primary_down")
cursor.on_primary_down = function()
self.pressed = true
self:set_from_cursor()

View File

@@ -1,4 +1,5 @@
--[[ UI specific utilities that might or might not depend on its state or options ]]
msg = require('mp.msg')
--- In place sorting of filenames
---@param filenames string[]
@@ -621,6 +622,7 @@ end
function render()
if not display.initialized then return end
msg.trace("render")
state.render_last_time = mp.get_time()
cursor.reset_handlers()

View File

@@ -683,6 +683,7 @@ end
function handle_mouse_pos(_, mouse)
if not mouse then return end
msg.trace("handle_mouse_pos: x:", mouse.x, ", y:", mouse.y, ", hover:", mouse.hover, ", hover_raw:", cursor.hover_raw, "first_real_received:", state.first_real_mouse_move_received)
if cursor.hover_raw and not mouse.hover then
cursor.leave()
else
@@ -891,7 +892,9 @@ cursor.decide_keybinds()
-- Pointer related binding groups
function make_cursor_handler(event, cb)
return function(...)
msg.trace("UOSC EVENT:", event)
call_maybe(cb, ...)
msg.trace("calling cursor[event]", cursor[event])
call_maybe(cursor[event], ...)
cursor.queue_autohide() -- refresh cursor autohide timer
end