Revision 87
fixed stuff
state_machine.c | ||
---|---|---|
71 | 71 |
|
72 | 72 |
if (event == NULL) |
73 | 73 |
return response; |
74 |
|
|
74 | 75 |
switch (state) { |
75 | 76 |
case INITIAL: |
76 | 77 |
if (event->type == LB_PRESSED) |
... | ... | |
78 | 79 |
break; |
79 | 80 |
case DRAG_UP: |
80 | 81 |
if (event->type == MOUSE_MOV) { |
81 |
if (abs(event->delta_x) > tolerance || abs(event->delta_y) > tolerance) {
|
|
82 |
if (event->delta_x < -tolerance || event->delta_y < -tolerance) {
|
|
82 | 83 |
state = INITIAL; |
83 | 84 |
x_length = 0; |
84 | 85 |
y_length = 0; |
... | ... | |
124 | 125 |
break; |
125 | 126 |
case DRAG_DOWN: |
126 | 127 |
if (event->type == MOUSE_MOV) { |
127 |
if (abs(event->delta_x) > tolerance || abs(event->delta_y) > tolerance) {
|
|
128 |
if (event->delta_x < -tolerance || event->delta_y > tolerance) {
|
|
128 | 129 |
state = INITIAL; |
129 | 130 |
x_length = 0; |
130 | 131 |
y_length = 0; |
Also available in: Unified diff