-
Notifications
You must be signed in to change notification settings - Fork 196
Xi: turn XIAllMasks from variable into #define #972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Xi: turn XIAllMasks from variable into #define #972
Conversation
No need to have an actual (const) variable for something that can easily be a #define. And also moving it into the only source file actually using it. Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
| const Mask DeviceOwnerGrabButtonMask = (1L << 17); | ||
| const Mask DevicePresenceNotifyMask = (1L << 18); | ||
| const Mask DevicePropertyNotifyMask = (1L << 19); | ||
| const Mask XIAllMasks = (1L << 20) - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I actually like the old version more. It makes sense to have it defined together with other masks, otherwise it’s too easy to forget about XIAllMasks, if a new DeviceProperty*Mask is added or removed. And it’s immediately clear why it’s 20 there when we have other definitions nearby.
No need to have an actual (const) variable for something that can easily
be a #define. And also moving it into the only source file actually
using it.
Signed-off-by: Enrico Weigelt, metux IT consult [email protected]