From c159ad3ab24b96d383fb0a6a11d2a395df9655d5 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sat, 23 Jul 2016 00:57:29 -0400 Subject: [PATCH] drawable: Add more data to the find_widgets metadata table --- docs/common/widget.ldoc | 8 ++++++++ lib/wibox/drawable.lua | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/common/widget.ldoc b/docs/common/widget.ldoc index 76b24eea9..199413977 100644 --- a/docs/common/widget.ldoc +++ b/docs/common/widget.ldoc @@ -68,6 +68,8 @@ -- @tparam number geometry.width The widget -- @tparam number geometry.height The height -- @tparam drawable geometry.drawable The `drawable` +-- @tparam table geometry.matrix_to_parent The relative `gears.matrix` +-- @tparam table geometry.matrix_to_device The absolute `gears.matrix` -- @see mouse --- When a mouse button is released over the widget. @@ -85,6 +87,8 @@ -- @tparam number geometry.width The widget -- @tparam number geometry.height The height -- @tparam drawable geometry.drawable The `drawable` +-- @tparam table geometry.matrix_to_parent The relative `gears.matrix` +-- @tparam table geometry.matrix_to_device The absolute `gears.matrix` -- @see mouse --- When the mouse enter a widget. @@ -96,6 +100,8 @@ -- @tparam number geometry.width The widget -- @tparam number geometry.height The height -- @tparam drawable geometry.drawable The `drawable` +-- @tparam table geometry.matrix_to_parent The relative `gears.matrix` +-- @tparam table geometry.matrix_to_device The absolute `gears.matrix` -- @see mouse --- When the mouse leave a widget. @@ -107,4 +113,6 @@ -- @tparam number geometry.width The widget -- @tparam number geometry.height The height -- @tparam drawable geometry.drawable The `drawable` +-- @tparam table geometry.matrix_to_parent The relative `gears.matrix` +-- @tparam table geometry.matrix_to_device The absolute `gears.matrix` -- @see mouse diff --git a/lib/wibox/drawable.lua b/lib/wibox/drawable.lua index 10cd8cfd4..ddeba52cf 100644 --- a/lib/wibox/drawable.lua +++ b/lib/wibox/drawable.lua @@ -170,7 +170,9 @@ local function find_widgets(_drawable, result, _hierarchy, x, y) 0, 0, width, height) table.insert(result, { x = x3, y = y3, width = w3, height = h3, - drawable = _drawable, widget = _hierarchy:get_widget() + drawable = _drawable, widget = _hierarchy:get_widget(), + matrix_to_device = _hierarchy:get_matrix_to_device(), + matrix_to_parent = _hierarchy:get_matrix_to_parent(), }) end for _, child in ipairs(_hierarchy:get_children()) do