Changeset 282c86d in mainline for uspace/lib/ui/src/entry.c
- Timestamp:
- 2021-07-21T16:12:49Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a106037
- Parents:
- c9722c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/entry.c
rc9722c1 r282c86d 767 767 pos.y = event->vpos; 768 768 769 /* Change cursor shape when pointer is entering/leaving */ 769 770 if (gfx_pix_inside_rect(&pos, &entry->rect)) { 770 771 if (!entry->pointer_inside) { … … 780 781 } 781 782 } 783 784 if (entry->held) { 785 /* 786 * Selecting using mouse drag: Change pos, 787 * keep sel_start 788 */ 789 entry->pos = ui_entry_find_pos(entry, &pos); 790 ui_entry_paint(entry); 791 } 782 792 } 783 793 … … 787 797 788 798 if (gfx_pix_inside_rect(&pos, &entry->rect)) { 799 /* Clicked inside - activate, set position */ 800 entry->held = true; 789 801 entry->pos = ui_entry_find_pos(entry, &pos); 790 802 entry->sel_start = entry->pos; … … 796 808 return ui_claimed; 797 809 } else { 810 /* Clicked outside - deactivate */ 798 811 ui_entry_deactivate(entry); 799 812 } 813 } 814 815 if (event->type == POS_RELEASE) { 816 entry->held = false; 800 817 } 801 818
Note:
See TracChangeset
for help on using the changeset viewer.