Changeset 88d828e in mainline for uspace/srv/hid/display/display.c


Ignore:
Timestamp:
2022-11-09T16:44:28Z (22 months ago)
Author:
Jiri Svoboda <jiri@…>
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)
Message:

Keyboard events need device ID too + some DS multiseat work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/display.c

    ra6492460 r88d828e  
    11/*
    2  * Copyright (c) 2021 Jiri Svoboda
     2 * Copyright (c) 2022 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    445445        ds_seat_t *seat;
    446446
    447         // TODO Determine which seat the event belongs to
    448         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);
    449449        if (seat == NULL)
    450450                return EOK;
     
    462462        ds_seat_t *seat;
    463463
    464         // TODO Determine which seat the event belongs to
    465         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);
    466466        if (seat == NULL)
    467467                return EOK;
     
    522522
    523523        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 */
     532ds_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);
    524538}
    525539
Note: See TracChangeset for help on using the changeset viewer.