You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual result:
callback function still called when pressing the assigned button.
dumping root.buttons() shows the the button still being assigned
Expected result:
The created button should be removed and the callback should not be fired upon clicking the assigned button
** How I discovered this **
While implementing a way to click away popups, removing a mousebinding had no effect at all.
Using mousegrabber for this has many other problems. I feel like there is no clean way to implement this as of yet.
Further information
Funny enough just adding a right button to the example given above, gives the correct behaviour. BUT this only worked in this example. In my popup the global mousebindings would never get removed no matter how i ordered the execution or how many buttons I assigned/removed.
function gtable.removeitem(t, item)
for k, v in ipairs(t) do
if v == item then
table.remove(t, k)
return true
end
end
return false
end
change remove_global_mousebinding function:
function mouse.remove_global_mousebinding(button)
local rbtns = capi.root._buttons()
for _, v in ipairs(button) do
gtable.removeitem(rbtns, v)
end
capi.root._buttons(rbtns)
end
Output of
awesome --version
:awesome v4.3-1593-g6f000aad2 (Too long)
• Compiled against Lua 5.4.4 (running with 0.9.2)
• API level: 4
• D-Bus support: yes
• xcb-errors support: no
• execinfo support: yes
• xcb-randr version: 1.6
• LGI version: /usr/share/lua/5.4/lgi/version.lua
• Transparency enabled: yes
• Custom search paths: no
How to reproduce the issue:
The issue presists even when using delays
Actual result:
callback function still called when pressing the assigned button.
dumping root.buttons() shows the the button still being assigned
Expected result:
The created button should be removed and the callback should not be fired upon clicking the assigned button
** How I discovered this **
While implementing a way to click away popups, removing a mousebinding had no effect at all.
Using mousegrabber for this has many other problems. I feel like there is no clean way to implement this as of yet.
Further information
Funny enough just adding a right button to the example given above, gives the correct behaviour. BUT this only worked in this example. In my popup the global mousebindings would never get removed no matter how i ordered the execution or how many buttons I assigned/removed.
The text was updated successfully, but these errors were encountered: