diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-12 18:15:42 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-12 18:15:42 +0200 |
commit | 31bf759f0a84d607c9aba6608f267c07f94ea991 (patch) | |
tree | c8d299853d5dbb066079ba4a9e38b0c28bdf64c9 /src | |
parent | ef07b24ad3431496372d3cfd2884b0609b940e27 (diff) |
InputWidget: Double-click to select all
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/inputwidget.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 018daec8..59608151 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -522,6 +522,9 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) { | |||
522 | copy_InputWidget_(d, iFalse); | 522 | copy_InputWidget_(d, iFalse); |
523 | return iTrue; | 523 | return iTrue; |
524 | } | 524 | } |
525 | if (ev->type == SDL_MOUSEMOTION && isHover_Widget(d)) { | ||
526 | setCursor_Window(get_Window(), SDL_SYSTEM_CURSOR_IBEAM); | ||
527 | } | ||
525 | switch (processEvent_Click(&d->click, ev)) { | 528 | switch (processEvent_Click(&d->click, ev)) { |
526 | case none_ClickResult: | 529 | case none_ClickResult: |
527 | break; | 530 | break; |
@@ -532,7 +535,11 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) { | |||
532 | d->inFlags &= ~isMarking_InputWidgetFlag; | 535 | d->inFlags &= ~isMarking_InputWidgetFlag; |
533 | return iTrue; | 536 | return iTrue; |
534 | case double_ClickResult: | 537 | case double_ClickResult: |
538 | selectAll_InputWidget(d); | ||
539 | d->inFlags &= ~isMarking_InputWidgetFlag; | ||
540 | return iTrue; | ||
535 | case aborted_ClickResult: | 541 | case aborted_ClickResult: |
542 | d->inFlags &= ~isMarking_InputWidgetFlag; | ||
536 | return iTrue; | 543 | return iTrue; |
537 | case drag_ClickResult: | 544 | case drag_ClickResult: |
538 | showCursor_InputWidget_(d); | 545 | showCursor_InputWidget_(d); |