Mir

Code review comment for lp:~mir-team/mir/unify-pointer-button

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> The new style event buttons are not using a mask so as to allow for extensibility so there
> is some churn in the change of the internal representation.

How is having a mask reduce extensibility? Do you mean running out of bits?

190+ bool button_state[mir_pointer_button_forward + 1];

This will break if we add a new member to the enum (although we will probably catch the issue at compile time). In any case, it's best to introduce a mir_pointer_button_count (or similar) value, and actually make it a policy to have such a member in all suitable enums.

Needs info/fixing

review: Needs Fixing

« Back to merge proposal