Do not wark is a button is pressed.
If a button is pressed, it's that the user is currently having the hand over it, don't make it move ! Signed-off-by: Pierre Habouzit <madcoder@debian.org>
This commit is contained in:
parent
a23b9e9771
commit
7b37c6cf0d
|
@ -338,9 +338,11 @@ function hook_arrange(screen)
|
||||||
local c_c = sel:coords_get()
|
local c_c = sel:coords_get()
|
||||||
local m_c = mouse.coords_get()
|
local m_c = mouse.coords_get()
|
||||||
|
|
||||||
if m_c.x < c_c.x or m_c.x > c_c.x + c_c.width or
|
if m_c.x < c_c.x or m_c.x >= c_c.x + c_c.width or
|
||||||
m_c.y < c_c.y or m_c.y > c_c.y + c_c.height then
|
m_c.y < c_c.y or m_c.y >= c_c.y + c_c.height then
|
||||||
mouse.coords_set(c_c.x + 1, c_c.y + 1)
|
if table.maxn(m_c.buttons) == 0 then
|
||||||
|
mouse.coords_set(c_c.x + 5, c_c.y + 5)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
]]
|
]]
|
||||||
|
|
Loading…
Reference in New Issue