mouse: Add 'current_widget'

This commit is contained in:
Emmanuel Lepage Vallee 2016-05-03 01:21:39 -04:00
parent cf0a4b42b4
commit 58ecc69af8
1 changed files with 17 additions and 0 deletions

View File

@ -333,6 +333,23 @@ end
function mouse.object.set_current_widgets() end
--- Get the topmost widget currently under the mouse cursor.
-- @property current_widget
-- @tparam widget|nil widget The widget
-- @treturn ?widget The widget
-- @treturn ?table The geometry.
-- @see wibox.find_widgets
function mouse.object.get_current_widget()
local wdgs, geos = mouse.object.get_current_widgets()
if wdgs then
return wdgs[#wdgs], geos[#geos]
end
end
function mouse.object.set_current_widget() end
--- True if the left mouse button is pressed.
-- @property is_left_mouse_button_pressed
-- @param boolean