Changeset 6c2aba3 in mainline for uspace/srv/hid/display
- Timestamp:
- 2020-02-19T17:04:40Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1388f7f0
- Parents:
- 0a052b0
- Location:
- uspace/srv/hid/display
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/display.c
r0a052b0 r6c2aba3 313 313 // TODO Determine which seat the event belongs to 314 314 seat = ds_display_first_seat(display); 315 printf("ds_display_post_ptd_event: seat=%p\n", seat);316 315 if (seat == NULL) 317 316 return EOK; -
uspace/srv/hid/display/input.c
r0a052b0 r6c2aba3 74 74 kbd_event_t event; 75 75 76 printf("ds_input_ev_key\n");77 76 event.type = type; 78 77 event.key = key; … … 88 87 ptd_event_t event; 89 88 90 printf("ds_input_ev_move\n");91 89 event.type = PTD_MOVE; 92 90 event.dmove.x = dx; … … 109 107 ptd_event_t event; 110 108 111 printf("ds_input_ev_abs_button\n");112 109 event.type = bpress ? PTD_PRESS : PTD_RELEASE; 113 110 event.btn_num = bnum; … … 129 126 const char *svc = "hid/input"; 130 127 131 printf("ds_input_open\n");132 128 errno_t rc = loc_service_get_id(svc, &dsid, 0); 133 129 if (rc != EOK) { … … 153 149 154 150 input_activate(display->input); 155 printf("ds_input_open: DONE\n");156 151 return EOK; 157 152 } -
uspace/srv/hid/display/main.c
r0a052b0 r6c2aba3 66 66 { 67 67 display_srv_t *srv = (display_srv_t *) arg; 68 printf("display_client_ev_pending\n"); 68 69 69 display_srv_ev_pending(srv); 70 70 } -
uspace/srv/hid/display/seat.c
r0a052b0 r6c2aba3 256 256 * @return EOK on success or an error code 257 257 */ 258 #include <stdio.h>259 258 errno_t ds_seat_post_ptd_event(ds_seat_t *seat, ptd_event_t *event) 260 259 { … … 265 264 errno_t rc; 266 265 267 printf("ds_seat_post_ptd_event\n");268 266 wnd = ds_display_window_by_pos(seat->display, &seat->pntpos); 269 267 270 268 /* Focus window on button press */ 271 269 if (event->type == PTD_PRESS && event->btn_num == 1) { 272 printf("PTD_PRESS (button = %d)\n", event->btn_num);273 270 if (wnd != NULL) { 274 printf("set focus\n");275 271 ds_seat_set_focus(seat, wnd); 276 272 } … … 291 287 292 288 if (event->type == PTD_MOVE) { 293 printf("PTD_MOVE\n");294 295 289 gfx_coord2_add(&seat->pntpos, &event->dmove, &npos); 296 290 gfx_coord2_clip(&npos, &disp->rect, &npos); 297 291 298 printf("clear pointer\n");299 292 (void) ds_seat_clear_pointer(seat); 300 293 seat->pntpos = npos; … … 310 303 return rc; 311 304 312 printf("draw pointer\n");313 305 (void) ds_seat_draw_pointer(seat); 314 306 } … … 329 321 errno_t rc; 330 322 331 printf("ds_seat_post_pos_event\n");332 333 323 wnd = ds_display_window_by_pos(seat->display, &seat->pntpos); 334 324 if (wnd != NULL) { 335 printf("send event to window at pointer position\n");336 325 rc = ds_window_post_pos_event(wnd, event); 337 326 if (rc != EOK) … … 340 329 341 330 if (seat->focus != wnd) { 342 printf("send event to focused window\n");343 344 331 rc = ds_window_post_pos_event(seat->focus, event); 345 332 if (rc != EOK)
Note:
See TracChangeset
for help on using the changeset viewer.