LemonBoy / bar

A featherweight, lemon-scented, bar based on xcb
MIT License
1.62k stars 194 forks source link

Fix the missing scrolling wheel support. #157

Closed krypt-n closed 8 years ago

krypt-n commented 8 years ago

Fix LemonBoy/bar#154 and krypt-n/bar#18

Problem was that an int:3 has a range of -4 to 3, buttons 4 and 5 did not fit into it. Why do we need to try to save memory by using bitfields here?

LemonBoy commented 8 years ago

Just turn the int into a unsigned int so it'll handle the range [0..5] just fine, wasting memory is a crime.

krypt-n commented 8 years ago

It doesn't matter.

krypt-n commented 8 years ago

Oh, I just noticed that on 32-Bit machines, version 1 and 3 are 4 byte smaller than version 2. I guess I will make the change you proposed, since you are so fond of bitfields and saving memory.