diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-03-25 20:41:33 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-03-25 20:48:41 +0200 |
commit | 6cedaecad9c4830aa29068b90611b8b9da301ac9 (patch) | |
tree | f321cce2cb0fa415d6a5dd8b788ce12d5a9a2848 /indra/newview/scripts/lua/test_luafloater_gesture_list.lua | |
parent | 6d3226ea5a680966dfb931c396691de43536fd88 (diff) |
Update test scripts to call leap.request() from main thread
Diffstat (limited to 'indra/newview/scripts/lua/test_luafloater_gesture_list.lua')
-rw-r--r-- | indra/newview/scripts/lua/test_luafloater_gesture_list.lua | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/indra/newview/scripts/lua/test_luafloater_gesture_list.lua b/indra/newview/scripts/lua/test_luafloater_gesture_list.lua index b1ff129d85..049ba757d3 100644 --- a/indra/newview/scripts/lua/test_luafloater_gesture_list.lua +++ b/indra/newview/scripts/lua/test_luafloater_gesture_list.lua @@ -7,12 +7,7 @@ LLGesture = require 'LLGesture' --event pump for sending actions to the floater COMMAND_PUMP_NAME = "" --table of floater UI events -event_list={} -coro.launch(function () - event_list = leap.request("LLFloaterReg", {op="getFloaterEvents"})["events"] - leap.done() -end) -leap.process() +event_list=leap.request("LLFloaterReg", {op="getFloaterEvents"}).events local function _event(event_name) if not table.find(event_list, event_name) then @@ -50,11 +45,7 @@ end local key = {xml_path = XML_FILE_PATH, op = "showLuaFloater"} --receive additional events for defined control {<control_name>= {action1, action2, ...}} key.extra_events={gesture_list = {_event("double_click")}} -coro.launch(function () - handleEvents(leap.request("LLFloaterReg", key)) - leap.done() -end) -leap.process() +handleEvents(leap.request("LLFloaterReg", key)) catch_events = leap.WaitFor:new(-1, "all_events") function catch_events:filter(pump, data) @@ -70,4 +61,3 @@ function process_events(waitfor) end coro.launch(process_events, catch_events) -leap.process() |