diff --git a/src/core/lcurses/lcurses.c b/src/core/lcurses/lcurses.c index eb2786e..4cced2b 100644 --- a/src/core/lcurses/lcurses.c +++ b/src/core/lcurses/lcurses.c @@ -65,6 +65,7 @@ Notes: #ifndef LUAJIT # define LUA_COMPAT_5_1 +# define LUA_COMPAT_5_3 # define LUA_COMPAT_ALL #endif #include "luaconf.h" diff --git a/src/ltui/application.lua b/src/ltui/application.lua index 04c7f92..1b44da7 100644 --- a/src/ltui/application.lua +++ b/src/ltui/application.lua @@ -28,6 +28,7 @@ local program = require("ltui/program") local desktop = require("ltui/desktop") local menubar = require("ltui/menubar") local statusbar = require("ltui/statusbar") +local action = require("ltui/action") -- define module local application = application or program() @@ -88,10 +89,10 @@ function application:on_event(e) if (not program.on_event(self, e)) and curses.KEY_MOUSE then -- mouse events - if e.type == ltui.event.ev_mouse and ( + if e.type == event.ev_mouse and ( e.btn_name == "BUTTON1_CLICKED" or e.btn_name == "BUTTON1_DOUBLE_CLICKED") then - self:action_on(ltui.action.ac_on_clicked, e.x, e.y) + self:action_on(action.ac_on_clicked, e.x, e.y) end end end diff --git a/src/ltui/boxdialog.lua b/src/ltui/boxdialog.lua index 184b9e8..509b49a 100644 --- a/src/ltui/boxdialog.lua +++ b/src/ltui/boxdialog.lua @@ -82,16 +82,13 @@ function boxdialog:init(name, bounds, title) local px, py = x - panel:bounds().sx, y - panel:bounds().sy -- if coordinates don't match any view try box - if panel:action_on(ltui.action.ac_on_clicked, x, y) and + if panel:action_on(action.ac_on_clicked, x, y) and (not box:option("selectable")) and box:bounds():contains(px, py) then -- bypass panel return box:action_on(action.ac_on_clicked, px, py) end - - -- return true if it doesn't match any selectable view - return true end) end end