awful.mouse: Follow C API changes

Whoops. This was broken ages ago. Thanks to Elv13 for making me notice.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2013-03-17 22:18:48 +01:00
parent ed763b9ad3
commit 7a47355c99
1 changed files with 4 additions and 13 deletions

View File

@ -41,24 +41,15 @@ function mouse.client_under_pointer()
end
end
--- Get the wibox object under the pointer.
-- @return The wibox object under the pointer, if one can be found.
function mouse.wibox_under_pointer()
--- Get the drawin object under the pointer.
-- @return The drawin object under the pointer, if one can be found.
function mouse.drawin_under_pointer()
local obj = capi.mouse.object_under_pointer()
if type(obj) == "wibox" then
if type(obj) == "drawin" then
return obj
end
end
--- Get the widget under the pointer.
-- @return The widget object under the pointer, if it can be found.
function mouse.widget_under_pointer()
local obj, obj2 = capi.mouse.object_under_pointer()
if type(obj2) == "widget" then
return obj2
end
end
local function snap_outside(g, sg, snap)
if g.x < snap + sg.x + sg.width and g.x > sg.x + sg.width then
g.x = sg.x + sg.width