Changeset 8edec53 in mainline for uspace/srv/hid/display
- Timestamp:
- 2021-10-25T17:51:10Z (4 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 91ece11b
- Parents:
- 805a149
- Location:
- uspace/srv/hid/display
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/input.c
r805a149 r8edec53 1 1 /* 2 * Copyright (c) 20 19Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 49 49 static errno_t ds_input_ev_abs_move(input_t *, unsigned, unsigned, unsigned, unsigned); 50 50 static errno_t ds_input_ev_button(input_t *, int, int); 51 static errno_t ds_input_ev_dclick(input_t *, int); 51 52 52 53 static input_ev_ops_t ds_input_ev_ops = { … … 56 57 .move = ds_input_ev_move, 57 58 .abs_move = ds_input_ev_abs_move, 58 .button = ds_input_ev_button 59 .button = ds_input_ev_button, 60 .dclick = ds_input_ev_dclick 59 61 }; 60 62 … … 131 133 132 134 event.type = bpress ? PTD_PRESS : PTD_RELEASE; 135 event.btn_num = bnum; 136 event.dmove.x = 0; 137 event.dmove.y = 0; 138 139 ds_display_lock(disp); 140 rc = ds_display_post_ptd_event(disp, &event); 141 ds_display_unlock(disp); 142 return rc; 143 } 144 145 static errno_t ds_input_ev_dclick(input_t *input, int bnum) 146 { 147 ds_display_t *disp = (ds_display_t *) input->user; 148 ptd_event_t event; 149 errno_t rc; 150 151 event.type = PTD_DCLICK; 133 152 event.btn_num = bnum; 134 153 event.dmove.x = 0; -
uspace/srv/hid/display/seat.c
r805a149 r8edec53 362 362 } 363 363 364 if (event->type == PTD_PRESS || event->type == PTD_RELEASE) { 364 if (event->type == PTD_PRESS || event->type == PTD_RELEASE || 365 event->type == PTD_DCLICK) { 365 366 pevent.pos_id = 0; 366 pevent.type = (event->type == PTD_PRESS) ? 367 POS_PRESS : POS_RELEASE; 367 switch (event->type) { 368 case PTD_PRESS: 369 pevent.type = POS_PRESS; 370 break; 371 case PTD_RELEASE: 372 pevent.type = POS_RELEASE; 373 break; 374 case PTD_DCLICK: 375 pevent.type = POS_DCLICK; 376 break; 377 default: 378 assert(false); 379 } 380 368 381 pevent.btn_num = event->btn_num; 369 382 pevent.hpos = seat->pntpos.x; -
uspace/srv/hid/display/types/display/ptd_event.h
r805a149 r8edec53 1 1 /* 2 * Copyright (c) 20 19Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 42 42 PTD_ABS_MOVE, 43 43 PTD_PRESS, 44 PTD_RELEASE 44 PTD_RELEASE, 45 PTD_DCLICK 45 46 } ptd_event_type_t; 46 47
Note:
See TracChangeset
for help on using the changeset viewer.
