Changeset 1388f7f0 in mainline for uspace/srv/hid/display/seat.c
- Timestamp:
- 2020-02-21T10:50:48Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 265989d
- Parents:
- 6c2aba3
- git-author:
- Jiri Svoboda <jiri@…> (2020-02-19 19:38:03)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-02-21 10:50:48)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/seat.c
r6c2aba3 r1388f7f0 256 256 * @return EOK on success or an error code 257 257 */ 258 #include <stdio.h> 258 259 errno_t ds_seat_post_ptd_event(ds_seat_t *seat, ptd_event_t *event) 259 260 { … … 306 307 } 307 308 309 if (event->type == PTD_ABS_MOVE) { 310 /* 311 * Project input device area onto display area. Technically 312 * we probably want to project onto the area of a particular 313 * display device. The tricky part is figuring out which 314 * display device the input device is associated with. 315 */ 316 gfx_coord2_project(&event->apos, &event->abounds, 317 &disp->rect, &npos); 318 319 gfx_coord2_clip(&npos, &disp->rect, &npos); 320 321 (void) ds_seat_clear_pointer(seat); 322 seat->pntpos = npos; 323 324 pevent.pos_id = 0; 325 pevent.type = POS_UPDATE; 326 pevent.btn_num = 0; 327 pevent.hpos = seat->pntpos.x; 328 pevent.vpos = seat->pntpos.y; 329 330 rc = ds_seat_post_pos_event(seat, &pevent); 331 if (rc != EOK) 332 return rc; 333 334 (void) ds_seat_draw_pointer(seat); 335 } 336 308 337 return EOK; 309 338 }
Note:
See TracChangeset
for help on using the changeset viewer.