Merge lp:~jpakkane/libgrip/deduplicate into lp:libgrip
- deduplicate
- Merge into trunk
Proposed by
Jussi Pakkanen
Status: | Merged |
---|---|
Merged at revision: | 42 |
Proposed branch: | lp:~jpakkane/libgrip/deduplicate |
Merge into: | lp:libgrip |
Diff against target: |
488 lines (+124/-333) 1 file modified
src/gripgesturemanager.c (+124/-333) |
To merge this branch: | bzr merge lp:~jpakkane/libgrip/deduplicate |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chase Douglas (community) | Approve | ||
Review via email: mp+64676@code.launchpad.net |
Commit message
Description of the change
Gesture_start, gesture_update and gesture_end are identical except for one parameter. This branch deduplicates these into one common function.
To post a comment you must log in.
Revision history for this message
Jussi Pakkanen (jpakkane) wrote : | # |
lp:~jpakkane/libgrip/deduplicate
updated
- 42. By Jussi Pakkanen
-
Removed useless duplication with a common function.
- 43. By Jussi Pakkanen
-
Put braces according to coding standards.
Revision history for this message
Jussi Pakkanen (jpakkane) wrote : | # |
Fixed.
Revision history for this message
Chase Douglas (chasedouglas) wrote : | # |
/me loves code simplification :).
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/gripgesturemanager.c' | |||
2 | --- src/gripgesturemanager.c 2011-05-19 11:11:35 +0000 | |||
3 | +++ src/gripgesturemanager.c 2011-06-15 12:53:25 +0000 | |||
4 | @@ -489,6 +489,127 @@ | |||
5 | 489 | return (x >= ax && x < ax + alloc.width && y >= ay && y < ay + alloc.height); | 489 | return (x >= ax && x < ax + alloc.width && y >= ay && y < ay + alloc.height); |
6 | 490 | } | 490 | } |
7 | 491 | 491 | ||
8 | 492 | |||
9 | 493 | static void process_gesture (void *cookie, | ||
10 | 494 | GeisGestureType type, | ||
11 | 495 | GeisGestureId id, | ||
12 | 496 | GeisSize attr_count, | ||
13 | 497 | GeisGestureAttr *attrs, | ||
14 | 498 | GripTimeType time_type) | ||
15 | 499 | { | ||
16 | 500 | GripGestureRegistration *reg = (GripGestureRegistration *)cookie; | ||
17 | 501 | GList *l = NULL; | ||
18 | 502 | |||
19 | 503 | for (l = reg->bindings; l != NULL; l = l->next) | ||
20 | 504 | { | ||
21 | 505 | GripGestureBinding *binding = (GripGestureBinding *)l->data; | ||
22 | 506 | |||
23 | 507 | if (binding->type == type) | ||
24 | 508 | { | ||
25 | 509 | GripGestureEvent *event = grip_gesture_event_new (type); | ||
26 | 510 | |||
27 | 511 | if (type == GRIP_GESTURE_DRAG) | ||
28 | 512 | { | ||
29 | 513 | GripEventGestureDrag *drag = (GripEventGestureDrag *)event; | ||
30 | 514 | |||
31 | 515 | drag->type = type; | ||
32 | 516 | drag->id = id; | ||
33 | 517 | drag->fingers = drag_gesture_handle_properties (drag, | ||
34 | 518 | attr_count, | ||
35 | 519 | attrs); | ||
36 | 520 | |||
37 | 521 | if (drag->fingers == binding->touches) | ||
38 | 522 | { | ||
39 | 523 | if (matches_widget (binding->widget, | ||
40 | 524 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
41 | 525 | (gint)drag->focus_x, | ||
42 | 526 | (gint)drag->focus_y)) | ||
43 | 527 | { | ||
44 | 528 | binding->callback (binding->widget, | ||
45 | 529 | time_type, | ||
46 | 530 | event, | ||
47 | 531 | binding->data); | ||
48 | 532 | } | ||
49 | 533 | } | ||
50 | 534 | } | ||
51 | 535 | else if (type == GRIP_GESTURE_PINCH) | ||
52 | 536 | { | ||
53 | 537 | GripEventGesturePinch *pinch = (GripEventGesturePinch *)event; | ||
54 | 538 | |||
55 | 539 | pinch->type = type; | ||
56 | 540 | pinch->id = id; | ||
57 | 541 | pinch->fingers = pinch_gesture_handle_properties (pinch, | ||
58 | 542 | attr_count, | ||
59 | 543 | attrs); | ||
60 | 544 | |||
61 | 545 | if (pinch->fingers == binding->touches) | ||
62 | 546 | { | ||
63 | 547 | if (matches_widget (binding->widget, | ||
64 | 548 | gtk_widget_get_window(GTK_WIDGET(reg->window)), | ||
65 | 549 | (gint)pinch->focus_x, | ||
66 | 550 | (gint)pinch->focus_y)) | ||
67 | 551 | { | ||
68 | 552 | binding->callback (binding->widget, | ||
69 | 553 | time_type, | ||
70 | 554 | event, | ||
71 | 555 | binding->data); | ||
72 | 556 | } | ||
73 | 557 | } | ||
74 | 558 | } | ||
75 | 559 | else if (type == GRIP_GESTURE_ROTATE) | ||
76 | 560 | { | ||
77 | 561 | GripEventGestureRotate *rotate = (GripEventGestureRotate *)event; | ||
78 | 562 | |||
79 | 563 | rotate->type = type; | ||
80 | 564 | rotate->id = id; | ||
81 | 565 | rotate->fingers = rotate_gesture_handle_properties (rotate, | ||
82 | 566 | attr_count, | ||
83 | 567 | attrs); | ||
84 | 568 | |||
85 | 569 | if (rotate->fingers == binding->touches) | ||
86 | 570 | { | ||
87 | 571 | if (matches_widget (binding->widget, | ||
88 | 572 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
89 | 573 | (gint)rotate->focus_x, | ||
90 | 574 | (gint)rotate->focus_y)) | ||
91 | 575 | { | ||
92 | 576 | binding->callback (binding->widget, | ||
93 | 577 | time_type, | ||
94 | 578 | event, | ||
95 | 579 | binding->data); | ||
96 | 580 | } | ||
97 | 581 | } | ||
98 | 582 | } | ||
99 | 583 | else if (type == GRIP_GESTURE_TAP) | ||
100 | 584 | { | ||
101 | 585 | GripEventGestureTap *tap = (GripEventGestureTap *)event; | ||
102 | 586 | |||
103 | 587 | tap->type = type; | ||
104 | 588 | tap->id = id; | ||
105 | 589 | tap->fingers = tap_gesture_handle_properties (tap, | ||
106 | 590 | attr_count, | ||
107 | 591 | attrs); | ||
108 | 592 | |||
109 | 593 | if (tap->fingers == binding->touches) | ||
110 | 594 | { | ||
111 | 595 | if (matches_widget (binding->widget, | ||
112 | 596 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
113 | 597 | (gint)tap->focus_x, | ||
114 | 598 | (gint)tap->focus_y)) | ||
115 | 599 | { | ||
116 | 600 | binding->callback (binding->widget, | ||
117 | 601 | time_type, | ||
118 | 602 | event, | ||
119 | 603 | binding->data); | ||
120 | 604 | } | ||
121 | 605 | } | ||
122 | 606 | } | ||
123 | 607 | |||
124 | 608 | grip_gesture_event_free (event); | ||
125 | 609 | } | ||
126 | 610 | } | ||
127 | 611 | } | ||
128 | 612 | |||
129 | 492 | static void | 613 | static void |
130 | 493 | gesture_start (void *cookie, | 614 | gesture_start (void *cookie, |
131 | 494 | GeisGestureType type, | 615 | GeisGestureType type, |
132 | @@ -496,117 +617,7 @@ | |||
133 | 496 | GeisSize attr_count, | 617 | GeisSize attr_count, |
134 | 497 | GeisGestureAttr *attrs) | 618 | GeisGestureAttr *attrs) |
135 | 498 | { | 619 | { |
247 | 499 | GripGestureRegistration *reg = (GripGestureRegistration *)cookie; | 620 | process_gesture(cookie, type, id, attr_count, attrs, GRIP_TIME_START); |
137 | 500 | GList *l = NULL; | ||
138 | 501 | |||
139 | 502 | for (l = reg->bindings; l != NULL; l = l->next) | ||
140 | 503 | { | ||
141 | 504 | GripGestureBinding *binding = (GripGestureBinding *)l->data; | ||
142 | 505 | |||
143 | 506 | if (binding->type == type) | ||
144 | 507 | { | ||
145 | 508 | GripGestureEvent *event = grip_gesture_event_new (type); | ||
146 | 509 | |||
147 | 510 | if (type == GRIP_GESTURE_DRAG) | ||
148 | 511 | { | ||
149 | 512 | GripEventGestureDrag *drag = (GripEventGestureDrag *)event; | ||
150 | 513 | |||
151 | 514 | drag->type = type; | ||
152 | 515 | drag->id = id; | ||
153 | 516 | drag->fingers = drag_gesture_handle_properties (drag, | ||
154 | 517 | attr_count, | ||
155 | 518 | attrs); | ||
156 | 519 | |||
157 | 520 | if (drag->fingers == binding->touches) | ||
158 | 521 | { | ||
159 | 522 | if (matches_widget (binding->widget, | ||
160 | 523 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
161 | 524 | (gint)drag->focus_x, | ||
162 | 525 | (gint)drag->focus_y)) | ||
163 | 526 | { | ||
164 | 527 | binding->callback (binding->widget, | ||
165 | 528 | GRIP_TIME_START, | ||
166 | 529 | event, | ||
167 | 530 | binding->data); | ||
168 | 531 | } | ||
169 | 532 | } | ||
170 | 533 | } | ||
171 | 534 | else if (type == GRIP_GESTURE_PINCH) | ||
172 | 535 | { | ||
173 | 536 | GripEventGesturePinch *pinch = (GripEventGesturePinch *)event; | ||
174 | 537 | |||
175 | 538 | pinch->type = type; | ||
176 | 539 | pinch->id = id; | ||
177 | 540 | pinch->fingers = pinch_gesture_handle_properties (pinch, | ||
178 | 541 | attr_count, | ||
179 | 542 | attrs); | ||
180 | 543 | |||
181 | 544 | if (pinch->fingers == binding->touches) | ||
182 | 545 | { | ||
183 | 546 | if (matches_widget (binding->widget, | ||
184 | 547 | gtk_widget_get_window(GTK_WIDGET(reg->window)), | ||
185 | 548 | (gint)pinch->focus_x, | ||
186 | 549 | (gint)pinch->focus_y)) | ||
187 | 550 | { | ||
188 | 551 | binding->callback (binding->widget, | ||
189 | 552 | GRIP_TIME_START, | ||
190 | 553 | event, | ||
191 | 554 | binding->data); | ||
192 | 555 | } | ||
193 | 556 | } | ||
194 | 557 | } | ||
195 | 558 | else if (type == GRIP_GESTURE_ROTATE) | ||
196 | 559 | { | ||
197 | 560 | GripEventGestureRotate *rotate = (GripEventGestureRotate *)event; | ||
198 | 561 | |||
199 | 562 | rotate->type = type; | ||
200 | 563 | rotate->id = id; | ||
201 | 564 | rotate->fingers = rotate_gesture_handle_properties (rotate, | ||
202 | 565 | attr_count, | ||
203 | 566 | attrs); | ||
204 | 567 | |||
205 | 568 | if (rotate->fingers == binding->touches) | ||
206 | 569 | { | ||
207 | 570 | if (matches_widget (binding->widget, | ||
208 | 571 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
209 | 572 | (gint)rotate->focus_x, | ||
210 | 573 | (gint)rotate->focus_y)) | ||
211 | 574 | { | ||
212 | 575 | binding->callback (binding->widget, | ||
213 | 576 | GRIP_TIME_START, | ||
214 | 577 | event, | ||
215 | 578 | binding->data); | ||
216 | 579 | } | ||
217 | 580 | } | ||
218 | 581 | } | ||
219 | 582 | else if (type == GRIP_GESTURE_TAP) | ||
220 | 583 | { | ||
221 | 584 | GripEventGestureTap *tap = (GripEventGestureTap *)event; | ||
222 | 585 | |||
223 | 586 | tap->type = type; | ||
224 | 587 | tap->id = id; | ||
225 | 588 | tap->fingers = tap_gesture_handle_properties (tap, | ||
226 | 589 | attr_count, | ||
227 | 590 | attrs); | ||
228 | 591 | |||
229 | 592 | if (tap->fingers == binding->touches) | ||
230 | 593 | { | ||
231 | 594 | if (matches_widget (binding->widget, | ||
232 | 595 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
233 | 596 | (gint)tap->focus_x, | ||
234 | 597 | (gint)tap->focus_y)) | ||
235 | 598 | { | ||
236 | 599 | binding->callback (binding->widget, | ||
237 | 600 | GRIP_TIME_START, | ||
238 | 601 | event, | ||
239 | 602 | binding->data); | ||
240 | 603 | } | ||
241 | 604 | } | ||
242 | 605 | } | ||
243 | 606 | |||
244 | 607 | grip_gesture_event_free (event); | ||
245 | 608 | } | ||
246 | 609 | } | ||
248 | 610 | } | 621 | } |
249 | 611 | 622 | ||
250 | 612 | static void | 623 | static void |
251 | @@ -616,117 +627,7 @@ | |||
252 | 616 | GeisSize attr_count, | 627 | GeisSize attr_count, |
253 | 617 | GeisGestureAttr *attrs) | 628 | GeisGestureAttr *attrs) |
254 | 618 | { | 629 | { |
366 | 619 | GripGestureRegistration *reg = (GripGestureRegistration *)cookie; | 630 | process_gesture(cookie, type, id, attr_count, attrs, GRIP_TIME_UPDATE); |
256 | 620 | GList *l = NULL; | ||
257 | 621 | |||
258 | 622 | for (l = reg->bindings; l != NULL; l = l->next) | ||
259 | 623 | { | ||
260 | 624 | GripGestureBinding *binding = (GripGestureBinding *)l->data; | ||
261 | 625 | |||
262 | 626 | if (binding->type == type) | ||
263 | 627 | { | ||
264 | 628 | GripGestureEvent *event = grip_gesture_event_new (type); | ||
265 | 629 | |||
266 | 630 | if (type == GRIP_GESTURE_DRAG) | ||
267 | 631 | { | ||
268 | 632 | GripEventGestureDrag *drag = (GripEventGestureDrag *)event; | ||
269 | 633 | |||
270 | 634 | drag->type = type; | ||
271 | 635 | drag->id = id; | ||
272 | 636 | drag->fingers = drag_gesture_handle_properties (drag, | ||
273 | 637 | attr_count, | ||
274 | 638 | attrs); | ||
275 | 639 | |||
276 | 640 | if (drag->fingers == binding->touches) | ||
277 | 641 | { | ||
278 | 642 | if (matches_widget (binding->widget, | ||
279 | 643 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
280 | 644 | (gint)drag->focus_x, | ||
281 | 645 | (gint)drag->focus_y)) | ||
282 | 646 | { | ||
283 | 647 | binding->callback (binding->widget, | ||
284 | 648 | GRIP_TIME_UPDATE, | ||
285 | 649 | event, | ||
286 | 650 | binding->data); | ||
287 | 651 | } | ||
288 | 652 | } | ||
289 | 653 | } | ||
290 | 654 | else if (type == GRIP_GESTURE_PINCH) | ||
291 | 655 | { | ||
292 | 656 | GripEventGesturePinch *pinch = (GripEventGesturePinch *)event; | ||
293 | 657 | |||
294 | 658 | pinch->type = type; | ||
295 | 659 | pinch->id = id; | ||
296 | 660 | pinch->fingers = pinch_gesture_handle_properties (pinch, | ||
297 | 661 | attr_count, | ||
298 | 662 | attrs); | ||
299 | 663 | |||
300 | 664 | if (pinch->fingers == binding->touches) | ||
301 | 665 | { | ||
302 | 666 | if (matches_widget (binding->widget, | ||
303 | 667 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
304 | 668 | (gint)pinch->focus_x, | ||
305 | 669 | (gint)pinch->focus_y)) | ||
306 | 670 | { | ||
307 | 671 | binding->callback (binding->widget, | ||
308 | 672 | GRIP_TIME_UPDATE, | ||
309 | 673 | event, | ||
310 | 674 | binding->data); | ||
311 | 675 | } | ||
312 | 676 | } | ||
313 | 677 | } | ||
314 | 678 | else if (type == GRIP_GESTURE_ROTATE) | ||
315 | 679 | { | ||
316 | 680 | GripEventGestureRotate *rotate = (GripEventGestureRotate *)event; | ||
317 | 681 | |||
318 | 682 | rotate->type = type; | ||
319 | 683 | rotate->id = id; | ||
320 | 684 | rotate->fingers = rotate_gesture_handle_properties (rotate, | ||
321 | 685 | attr_count, | ||
322 | 686 | attrs); | ||
323 | 687 | |||
324 | 688 | if (rotate->fingers == binding->touches) | ||
325 | 689 | { | ||
326 | 690 | if (matches_widget (binding->widget, | ||
327 | 691 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
328 | 692 | (gint)rotate->focus_x, | ||
329 | 693 | (gint)rotate->focus_y)) | ||
330 | 694 | { | ||
331 | 695 | binding->callback (binding->widget, | ||
332 | 696 | GRIP_TIME_UPDATE, | ||
333 | 697 | event, | ||
334 | 698 | binding->data); | ||
335 | 699 | } | ||
336 | 700 | } | ||
337 | 701 | } | ||
338 | 702 | else if (type == GRIP_GESTURE_TAP) | ||
339 | 703 | { | ||
340 | 704 | GripEventGestureTap *tap = (GripEventGestureTap *)event; | ||
341 | 705 | |||
342 | 706 | tap->type = type; | ||
343 | 707 | tap->id = id; | ||
344 | 708 | tap->fingers = tap_gesture_handle_properties (tap, | ||
345 | 709 | attr_count, | ||
346 | 710 | attrs); | ||
347 | 711 | |||
348 | 712 | if (tap->fingers == binding->touches) | ||
349 | 713 | { | ||
350 | 714 | if (matches_widget (binding->widget, | ||
351 | 715 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
352 | 716 | (gint)tap->focus_x, | ||
353 | 717 | (gint)tap->focus_y)) | ||
354 | 718 | { | ||
355 | 719 | binding->callback (binding->widget, | ||
356 | 720 | GRIP_TIME_UPDATE, | ||
357 | 721 | event, | ||
358 | 722 | binding->data); | ||
359 | 723 | } | ||
360 | 724 | } | ||
361 | 725 | } | ||
362 | 726 | |||
363 | 727 | grip_gesture_event_free (event); | ||
364 | 728 | } | ||
365 | 729 | } | ||
367 | 730 | } | 631 | } |
368 | 731 | 632 | ||
369 | 732 | static void | 633 | static void |
370 | @@ -736,117 +637,7 @@ | |||
371 | 736 | GeisSize attr_count, | 637 | GeisSize attr_count, |
372 | 737 | GeisGestureAttr *attrs) | 638 | GeisGestureAttr *attrs) |
373 | 738 | { | 639 | { |
485 | 739 | GripGestureRegistration *reg = (GripGestureRegistration *)cookie; | 640 | process_gesture(cookie, type, id, attr_count, attrs, GRIP_TIME_END); |
375 | 740 | GList *l = NULL; | ||
376 | 741 | |||
377 | 742 | for (l = reg->bindings; l != NULL; l = l->next) | ||
378 | 743 | { | ||
379 | 744 | GripGestureBinding *binding = (GripGestureBinding *)l->data; | ||
380 | 745 | |||
381 | 746 | if (binding->type == type) | ||
382 | 747 | { | ||
383 | 748 | GripGestureEvent *event = grip_gesture_event_new (type); | ||
384 | 749 | |||
385 | 750 | if (type == GRIP_GESTURE_DRAG) | ||
386 | 751 | { | ||
387 | 752 | GripEventGestureDrag *drag = (GripEventGestureDrag *)event; | ||
388 | 753 | |||
389 | 754 | drag->type = type; | ||
390 | 755 | drag->id = id; | ||
391 | 756 | drag->fingers = drag_gesture_handle_properties (drag, | ||
392 | 757 | attr_count, | ||
393 | 758 | attrs); | ||
394 | 759 | |||
395 | 760 | if (drag->fingers == binding->touches) | ||
396 | 761 | { | ||
397 | 762 | if (matches_widget (binding->widget, | ||
398 | 763 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
399 | 764 | (gint)drag->focus_x, | ||
400 | 765 | (gint)drag->focus_y)) | ||
401 | 766 | { | ||
402 | 767 | binding->callback (binding->widget, | ||
403 | 768 | GRIP_TIME_END, | ||
404 | 769 | event, | ||
405 | 770 | binding->data); | ||
406 | 771 | } | ||
407 | 772 | } | ||
408 | 773 | } | ||
409 | 774 | else if (type == GRIP_GESTURE_PINCH) | ||
410 | 775 | { | ||
411 | 776 | GripEventGesturePinch *pinch = (GripEventGesturePinch *)event; | ||
412 | 777 | |||
413 | 778 | pinch->type = type; | ||
414 | 779 | pinch->id = id; | ||
415 | 780 | pinch->fingers = pinch_gesture_handle_properties (pinch, | ||
416 | 781 | attr_count, | ||
417 | 782 | attrs); | ||
418 | 783 | |||
419 | 784 | if (pinch->fingers == binding->touches) | ||
420 | 785 | { | ||
421 | 786 | if (matches_widget (binding->widget, | ||
422 | 787 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
423 | 788 | (gint)pinch->focus_x, | ||
424 | 789 | (gint)pinch->focus_y)) | ||
425 | 790 | { | ||
426 | 791 | binding->callback (binding->widget, | ||
427 | 792 | GRIP_TIME_END, | ||
428 | 793 | event, | ||
429 | 794 | binding->data); | ||
430 | 795 | } | ||
431 | 796 | } | ||
432 | 797 | } | ||
433 | 798 | else if (type == GRIP_GESTURE_ROTATE) | ||
434 | 799 | { | ||
435 | 800 | GripEventGestureRotate *rotate = (GripEventGestureRotate *)event; | ||
436 | 801 | |||
437 | 802 | rotate->type = type; | ||
438 | 803 | rotate->id = id; | ||
439 | 804 | rotate->fingers = rotate_gesture_handle_properties (rotate, | ||
440 | 805 | attr_count, | ||
441 | 806 | attrs); | ||
442 | 807 | |||
443 | 808 | if (rotate->fingers == binding->touches) | ||
444 | 809 | { | ||
445 | 810 | if (matches_widget (binding->widget, | ||
446 | 811 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
447 | 812 | (gint)rotate->focus_x, | ||
448 | 813 | (gint)rotate->focus_y)) | ||
449 | 814 | { | ||
450 | 815 | binding->callback (binding->widget, | ||
451 | 816 | GRIP_TIME_END, | ||
452 | 817 | event, | ||
453 | 818 | binding->data); | ||
454 | 819 | } | ||
455 | 820 | } | ||
456 | 821 | } | ||
457 | 822 | else if (type == GRIP_GESTURE_TAP) | ||
458 | 823 | { | ||
459 | 824 | GripEventGestureTap *tap = (GripEventGestureTap *)event; | ||
460 | 825 | |||
461 | 826 | tap->type = type; | ||
462 | 827 | tap->id = id; | ||
463 | 828 | tap->fingers = tap_gesture_handle_properties (tap, | ||
464 | 829 | attr_count, | ||
465 | 830 | attrs); | ||
466 | 831 | |||
467 | 832 | if (tap->fingers == binding->touches) | ||
468 | 833 | { | ||
469 | 834 | if (matches_widget (binding->widget, | ||
470 | 835 | gtk_widget_get_window(GTK_WIDGET (reg->window)), | ||
471 | 836 | (gint)tap->focus_x, | ||
472 | 837 | (gint)tap->focus_y)) | ||
473 | 838 | { | ||
474 | 839 | binding->callback (binding->widget, | ||
475 | 840 | GRIP_TIME_END, | ||
476 | 841 | event, | ||
477 | 842 | binding->data); | ||
478 | 843 | } | ||
479 | 844 | } | ||
480 | 845 | } | ||
481 | 846 | |||
482 | 847 | grip_gesture_event_free (event); | ||
483 | 848 | } | ||
484 | 849 | } | ||
486 | 850 | } | 641 | } |
487 | 851 | 642 | ||
488 | 852 | static void | 643 | static void |
Whoops, theres an extra thingy there. I'll push a fixed version.