From eb9dbf991c88499a9b993563b8d2357b364254fb Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 1 Oct 2016 16:18:40 +0200 Subject: [PATCH] Widgets: Get mouse position right for button press/release Signed-off-by: Uli Schlachter --- lib/wibox/drawable.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/wibox/drawable.lua b/lib/wibox/drawable.lua index e7df58217..6a99ee285 100644 --- a/lib/wibox/drawable.lua +++ b/lib/wibox/drawable.lua @@ -386,8 +386,7 @@ function drawable.new(d, widget_context_skeleton, drawable_name) local widgets = ret:find_widgets(x, y) for _, v in pairs(widgets) do -- Calculate x/y inside of the widget - local lx = x - v.x - local ly = y - v.y + local lx, ly = v.hierarchy:get_matrix_from_device():transform_point(x, y) v.widget:emit_signal(name, lx, ly, button, modifiers,v) end end)