diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-27 14:17:33 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-27 14:17:33 +0200 |
commit | 2a4f5d0f67fcd1412968ef967ed3009469a46b90 (patch) | |
tree | ae18c6005ed124effeaf7d84e1bff8339f2509e0 /src/ui/inputwidget.c | |
parent | 71c258194653ab332458fe0620d300f41213603c (diff) |
Processing of double clicks
The click handling utility no longer treats double clicks as a special case. An arbitrary number of clicks is kept in a separate counter.
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r-- | src/ui/inputwidget.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 52359732..12bef08b 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -735,10 +735,6 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) { | |||
735 | iZap(d->mark); | 735 | iZap(d->mark); |
736 | d->inFlags &= ~isMarking_InputWidgetFlag; | 736 | d->inFlags &= ~isMarking_InputWidgetFlag; |
737 | return iTrue; | 737 | return iTrue; |
738 | case double_ClickResult: | ||
739 | selectAll_InputWidget(d); | ||
740 | d->inFlags &= ~isMarking_InputWidgetFlag; | ||
741 | return iTrue; | ||
742 | case aborted_ClickResult: | 738 | case aborted_ClickResult: |
743 | d->inFlags &= ~isMarking_InputWidgetFlag; | 739 | d->inFlags &= ~isMarking_InputWidgetFlag; |
744 | return iTrue; | 740 | return iTrue; |
@@ -753,6 +749,10 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) { | |||
753 | refresh_Widget(w); | 749 | refresh_Widget(w); |
754 | return iTrue; | 750 | return iTrue; |
755 | case finished_ClickResult: | 751 | case finished_ClickResult: |
752 | if (d->click.count == 2) { | ||
753 | selectAll_InputWidget(d); | ||
754 | d->inFlags &= ~isMarking_InputWidgetFlag; | ||
755 | } | ||
756 | return iTrue; | 756 | return iTrue; |
757 | } | 757 | } |
758 | if (ev->type == SDL_MOUSEBUTTONDOWN && ev->button.button == SDL_BUTTON_RIGHT && | 758 | if (ev->type == SDL_MOUSEBUTTONDOWN && ev->button.button == SDL_BUTTON_RIGHT && |