r/awesomewmโ€ข
seqizz

How to "not" pass input to the client?

Hi there,

I have the following config piece:

client.connect_signal("manage", function (c)
c:buttons(gears.table.join(
	awful.button({win}, 4, function() change_opacity(c, true) end),
	awful.button({win}, 5, function() change_opacity(c, false) end)
))
end)

Which uses my function to change c.opacity value as you can guess. Question is, it doesn't prevent the scroll action on the app afterwards. So if I win+scroll on firefox, while it changes the opacity, it also scrolls the page :)

Any ideas? Thanks!

EDIT: Solved by mousegrabber, nevermind! ๐ŸŽ‰

Posted Jul 5, 2022, 11:19 AM UTC ยท edited

55
AdamNejmโ€ข

Are you using Awesome 4.2 or the development branch?
I'm trying to figure out why the solution you linked to isn't working for me.

Thanks!

1
seqizzOPโ€ข

what error do you get?

1
AdamNejmโ€ข

I'm not getting any error, but the behavior of your solution is inconsistent across applications and passes the initial scroll wheel input to the client.

Please see: https://www.reddit.com/r/awesomewm/comments/vv00ix/-/ifj8bzi

I'd also appreciate if you could perform the test I've mentioned in the linked comment and report back with your results. Thanks in advance!

1
seqizzOPโ€ข

I also realized this, especially on touchpad, but didn't care too much. I assumed either the mousegrabber was working not so well (sometimes scrolling slow caused no issues), or there was some other pointer used for some reason (passing "mouse" here but there are gazillion more apparently, didn't dig).

I'll check once I'm with a computer again and report back.

2
seqizzOPโ€ข

Since I am registering the buttons as client buttons, as soon as I move the mouse outside of client area, it stops working. It doesn't send scroll with or without the binding, even with focus staying on the client. So the test you mentioned will not work in my case sadly, if I understand correct.

1