mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
mouse: Add the current_widget_geometry property
Apparently, __index cannot return multiple values, so the previous code wasn't working.
This commit is contained in:
parent
23ad19d988
commit
ce5cdb49ed
1 changed files with 23 additions and 2 deletions
|
@ -284,7 +284,6 @@ end
|
|||
-- @treturn table The list of widgets.The first element is the biggest
|
||||
-- container while the last is the topmost widget. The table contains *x*, *y*,
|
||||
-- *width*, *height* and *widget*.
|
||||
-- @treturn table The list of geometries.
|
||||
-- @see wibox.find_widgets
|
||||
|
||||
function mouse.object.get_current_widgets()
|
||||
|
@ -308,8 +307,8 @@ end
|
|||
-- @property current_widget
|
||||
-- @tparam widget|nil widget The widget
|
||||
-- @treturn ?widget The widget
|
||||
-- @treturn ?table The geometry.
|
||||
-- @see wibox.find_widgets
|
||||
-- @see current_widget_geometry
|
||||
|
||||
function mouse.object.get_current_widget()
|
||||
local wdgs, geos = mouse.object.get_current_widgets()
|
||||
|
@ -319,6 +318,28 @@ function mouse.object.get_current_widget()
|
|||
end
|
||||
end
|
||||
|
||||
--- Get the current widget geometry.
|
||||
-- @property current_widget_geometry
|
||||
-- @tparam ?table The geometry.
|
||||
-- @see current_widget
|
||||
|
||||
function mouse.object.get_current_widget_geometry()
|
||||
local _, ret = mouse.object.get_current_widget()
|
||||
|
||||
return ret
|
||||
end
|
||||
|
||||
--- Get the current widget geometries.
|
||||
-- @property current_widget_geometries
|
||||
-- @tparam ?table A list of geometry tables.
|
||||
-- @see current_widgets
|
||||
|
||||
function mouse.object.get_current_widget_geometries()
|
||||
local _, ret = mouse.object.get_current_widgets()
|
||||
|
||||
return ret
|
||||
end
|
||||
|
||||
--- True if the left mouse button is pressed.
|
||||
-- @property is_left_mouse_button_pressed
|
||||
-- @param boolean
|
||||
|
|
Loading…
Reference in a new issue