Changeset 88d828e in mainline
- Timestamp:
- 2022-11-09T16:44:28Z (2 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 68704ab
- Parents:
- a6492460
- git-author:
- Jiri Svoboda <jiri@…> (2022-11-09 16:41:51)
- git-committer:
- Jiri Svoboda <jiri@…> (2022-11-09 16:44:28)
- Location:
- uspace
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/io/kbd_event.h
ra6492460 r88d828e 1 1 /* 2 * Copyright (c) 20 12 Jiri Svoboda2 * Copyright (c) 2022 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 39 39 #include <inttypes.h> 40 40 #include <io/keycode.h> 41 #include <types/common.h> 41 42 42 43 typedef enum { … … 49 50 /** List handle */ 50 51 link_t link; 52 53 /** Keyboard device ID */ 54 sysarg_t kbd_id; 51 55 52 56 /** Press or release event. */ -
uspace/srv/hid/display/display.c
ra6492460 r88d828e 1 1 /* 2 * Copyright (c) 202 1Jiri Svoboda2 * Copyright (c) 2022 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 445 445 ds_seat_t *seat; 446 446 447 / / TODO Determine which seat the event belongs to448 seat = ds_display_ first_seat(display);447 /* Determine which seat the event belongs to */ 448 seat = ds_display_seat_by_idev(display, event->kbd_id); 449 449 if (seat == NULL) 450 450 return EOK; … … 462 462 ds_seat_t *seat; 463 463 464 / / TODO Determine which seat the event belongs to465 seat = ds_display_ first_seat(display);464 /* Determine which seat the event belongs to */ 465 seat = ds_display_seat_by_idev(display, event->pos_id); 466 466 if (seat == NULL) 467 467 return EOK; … … 522 522 523 523 return list_get_instance(link, ds_seat_t, lseats); 524 } 525 526 /** Get seat which owns the specified input device. 527 * 528 * @param disp Display 529 * @param idev_id Input device ID 530 * @return Seat which owns device with ID @a idev_id or @c NULL if not found 531 */ 532 ds_seat_t *ds_display_seat_by_idev(ds_display_t *disp, ds_idev_id_t idev_id) 533 { 534 // TODO Multi-seat 535 (void) idev_id; 536 537 return ds_display_first_seat(disp); 524 538 } 525 539 -
uspace/srv/hid/display/display.h
ra6492460 r88d828e 46 46 #include "types/display/ddev.h" 47 47 #include "types/display/display.h" 48 #include "types/display/idev.h" 48 49 #include "types/display/ptd_event.h" 49 50 #include "types/display/seat.h" … … 79 80 extern ds_seat_t *ds_display_first_seat(ds_display_t *); 80 81 extern ds_seat_t *ds_display_next_seat(ds_seat_t *); 82 extern ds_seat_t *ds_display_seat_by_idev(ds_display_t *, ds_idev_id_t); 81 83 extern errno_t ds_display_add_ddev(ds_display_t *, ds_ddev_t *); 82 84 extern void ds_display_remove_ddev(ds_ddev_t *); -
uspace/srv/hid/display/input.c
ra6492460 r88d828e 80 80 errno_t rc; 81 81 82 (void)kbd_id; 83 82 event.kbd_id = kbd_id; 84 83 event.type = type; 85 84 event.key = key; -
uspace/srv/hid/display/test/display.c
ra6492460 r88d828e 317 317 } 318 318 319 /** ds_display_seat_by_idev() returns the correct seat. */ 320 PCUT_TEST(display_seat_by_idev) 321 { 322 // XXX TODO 323 } 324 319 325 /** Test ds_display_post_kbd_event() delivers event to client callback. 320 326 */ -
uspace/srv/hid/display/window.c
ra6492460 r88d828e 142 142 } 143 143 144 // TODO Multi-seat: which seat should own the new window? 144 145 seat = ds_display_first_seat(client->display); 145 146 … … 505 506 wnd->preview_rect = wnd->rect; 506 507 507 // XXX Need client to tell us which seat started the resize!508 // TODO Multi-seat: need client to tell us which seat started the resize! 508 509 seat = ds_display_first_seat(wnd->display); 509 510 ctype = display_cursor_from_wrsz(rsztype); … … 536 537 ds_client_post_resize_event(wnd->client, wnd, &nrect); 537 538 538 // XXXNeed to know which seat started the resize!539 // TODO Multi-seat: Need to know which seat started the resize! 539 540 seat = ds_display_first_seat(wnd->display); 540 541 ds_seat_set_wm_cursor(seat, NULL); -
uspace/srv/hid/display/wmops.c
ra6492460 r88d828e 171 171 } 172 172 173 // TODO Multi-seat 174 (void) dev_id; 175 seat = ds_display_first_seat(wnd->display); 173 /* Determine which seat's focus should be changed */ 174 seat = ds_display_seat_by_idev(wnd->display, dev_id); 175 if (seat == NULL) { 176 ds_display_unlock(wmclient->display); 177 return ENOENT; 178 } 176 179 177 180 /* Switch focus */
Note:
See TracChangeset
for help on using the changeset viewer.