… | |
… | |
78 | // return: priority_of_a - priority_of_b |
78 | // return: priority_of_a - priority_of_b |
79 | static int |
79 | static int |
80 | compare_priority (keysym_t *a, keysym_t *b) |
80 | compare_priority (keysym_t *a, keysym_t *b) |
81 | { |
81 | { |
82 | // (the more '1's in state; the less range): the greater priority |
82 | // (the more '1's in state; the less range): the greater priority |
83 | int ca = rxvt_popcount (a->state /* & OtherModMask */); |
83 | int ca = ecb_popcount32 (a->state /* & OtherModMask */); |
84 | int cb = rxvt_popcount (b->state /* & OtherModMask */); |
84 | int cb = ecb_popcount32 (b->state /* & OtherModMask */); |
85 | |
85 | |
86 | if (ca != cb) |
86 | if (ca != cb) |
87 | return ca - cb; |
87 | return ca - cb; |
88 | //else if (a->state != b->state) // this behavior is to be discussed |
88 | //else if (a->state != b->state) // this behavior is to be discussed |
89 | // return b->state - a->state; |
89 | // return b->state - a->state; |