You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i open the hammerspoon console, hide()/show() has no blocked time. When i switch to other program, i press option+g show the chooser which has no blocked time.When i need to press option+g again to hide it , there is always 3 seconds which i have to wait. I add print to find which function cause the block, i found the obj.chooser:hide() cause the stuck. But i don't know how to debug objective-c, is there anyone has the same situation like me ?
@latenitefilms I have updated the code and log, could you give me any suggestion?
function obj:toggleShow()
if #obj.sources_overview == 0 then
-- If it's the first time HSearch shows itself, then load all sources from files obj:loadSources() -- Show sources overview, so users know what to do next. obj.chooser:choices(obj.sources_overview) end if obj.chooser:isVisible() then print(1) -- hs.timer.doAfter(0, function() obj.chooser:hide() end) obj.chooser:hide() print(2) obj.trigger:disable() print(3) for _,val in pairs(obj.hotkeys) do for i=1,#val do print(5) val[i]:disable() end end else if obj.trigger == nil then obj.trigger = hs.hotkey.bind("", "tab", nil, function() obj:switchSource() end) else obj.trigger:enable() end for key,val in pairs(obj.hotkeys) do if key == obj.source_kw then for i=1,#val do val[i]:enable() end end end obj.chooser:show() endend
When i open the hammerspoon console, hide()/show() has no blocked time. When i switch to other program, i press option+g show the chooser which has no blocked time.When i need to press option+g again to hide it , there is always 3 seconds which i have to wait. I add print to find which function cause the block, i found the obj.chooser:hide() cause the stuck. But i don't know how to debug objective-c, is there anyone has the same situation like me ?
environment: 10.12.6
spoon: HSearch.spoon
line: 224-254.
@latenitefilms I have updated the code and log, could you give me any suggestion?
normal
when I open the console, i get the log below.
blocked
But when i work on chrome/vscode forefround, i get the blocked log below.
The text was updated successfully, but these errors were encountered: