SDL keyboard input: should go to top level widget only

Avoid the typed input to be added to all
InputText present on the stack: only the
top one should handle it.
This commit is contained in:
poire-z
2021-07-15 22:03:02 +02:00
parent e46accbcc5
commit 16ab5aa194

View File

@@ -264,7 +264,7 @@ function Device:init()
self.window.left = ev.value.data1
self.window.top = ev.value.data2
elseif ev.code == SDL_TEXTINPUT then
UIManager:broadcastEvent(Event:new("TextInput", ev.value))
UIManager:sendEvent(Event:new("TextInput", ev.value))
end
end,
hasClipboardText = function()