DRYer
This commit is contained in:
parent
838a85ee8b
commit
e7b216ba68
@ -67,13 +67,11 @@ static char mouse_event_buf[64];
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
encode_mouse_event_impl(const MousePosition *mpos, int mouse_tracking_protocol, int button, MouseAction action, int mods) {
|
encode_mouse_event_impl(const MousePosition *mpos, int mouse_tracking_protocol, int button, MouseAction action, int mods) {
|
||||||
unsigned int cb = 0;
|
unsigned int cb = encode_button(button);
|
||||||
if (action == MOVE) {
|
if (action == MOVE) {
|
||||||
cb = encode_button(button);
|
|
||||||
if (cb == UINT_MAX) cb = 3;
|
if (cb == UINT_MAX) cb = 3;
|
||||||
cb += 32;
|
cb += 32;
|
||||||
} else {
|
} else {
|
||||||
cb = encode_button(button);
|
|
||||||
if (cb == UINT_MAX) return 0;
|
if (cb == UINT_MAX) return 0;
|
||||||
}
|
}
|
||||||
if (action == DRAG || action == MOVE) cb |= MOTION_INDICATOR;
|
if (action == DRAG || action == MOVE) cb |= MOTION_INDICATOR;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user