From aba1cf398ff9203b5fcdc770e14a6646d67a0585 Mon Sep 17 00:00:00 2001 From: jpkotta Date: Mon, 1 Mar 2021 01:03:14 -0600 Subject: [PATCH] fix client:activate action mouse_center (#3257) --- lib/awful/client.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/awful/client.lua b/lib/awful/client.lua index 1a39345f2..807027362 100644 --- a/lib/awful/client.lua +++ b/lib/awful/client.lua @@ -1531,13 +1531,13 @@ function client.object.activate(c, args) elseif new_args.action and new_args.action == "mouse_resize" then amousec.resize(c) elseif new_args.action and new_args.action == "mouse_center" then - local coords, geo = mouse.mouse.coords(), c:geometry() + local coords, geo = capi.mouse.coords(), c:geometry() coords.width, coords.height = 1,1 if not grect.area_intersect_area(geo, coords) then -- Do not use `awful.placement` to avoid an useless circular -- dependency. Centering is *very* simple. - mouse.mouse.coords { + capi.mouse.coords { x = geo.x + math.ceil(geo.width /2), y = geo.y + math.ceil(geo.height/2) }