Replace hard coded numbers with mouse button defines (#163503)
No behaviour change, just for clarity.
This commit is contained in:
parent
ffd53ff166
commit
5365993ff5
@ -137,13 +137,13 @@ static gboolean get_mouse_button(GdkEvent* event, int64_t* button) {
|
|||||||
gdk_event_get_button(event, &event_button);
|
gdk_event_get_button(event, &event_button);
|
||||||
|
|
||||||
switch (event_button) {
|
switch (event_button) {
|
||||||
case 1:
|
case GDK_BUTTON_PRIMARY:
|
||||||
*button = kFlutterPointerButtonMousePrimary;
|
*button = kFlutterPointerButtonMousePrimary;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case 2:
|
case GDK_BUTTON_MIDDLE:
|
||||||
*button = kFlutterPointerButtonMouseMiddle;
|
*button = kFlutterPointerButtonMouseMiddle;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case 3:
|
case GDK_BUTTON_SECONDARY:
|
||||||
*button = kFlutterPointerButtonMouseSecondary;
|
*button = kFlutterPointerButtonMouseSecondary;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user