Changeset 4fbdc3d in mainline for uspace/srv/hid/display/display.c
- Timestamp:
- 2019-12-11T16:58:30Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4d9c807
- Parents:
- 5bded44
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/display.c
r5bded44 r4fbdc3d 267 267 * @param event Event 268 268 */ 269 errno_t ds_display_post_pos_event(ds_display_t *display, pos_event_t *event) 270 { 271 gfx_coord2_t pos; 272 ds_window_t *wnd; 269 errno_t ds_display_post_ptd_event(ds_display_t *display, ptd_event_t *event) 270 { 273 271 ds_seat_t *seat; 274 272 275 /* Focus window on button press */ 276 if (event->type == POS_PRESS) { 277 printf("Button press\n"); 278 pos.x = event->hpos; 279 pos.y = event->vpos; 280 281 wnd = ds_display_window_by_pos(display, &pos); 282 if (wnd != NULL) { 283 seat = ds_display_first_seat(display); 284 if (seat == NULL) 285 return EOK; 286 287 ds_seat_set_focus(seat, wnd); 288 return EOK; 289 } 290 } 291 292 return EOK; 273 // TODO Determine which seat the event belongs to 274 seat = ds_display_first_seat(display); 275 printf("ds_display_post_ptd_event: seat=%p\n", seat); 276 if (seat == NULL) 277 return EOK; 278 279 return ds_seat_post_ptd_event(seat, event); 293 280 } 294 281 … … 408 395 ddev = ds_display_first_ddev(display); 409 396 if (ddev == NULL) 410 abort();397 return NULL; 411 398 412 399 return ddev->gc;
Note:
See TracChangeset
for help on using the changeset viewer.