Ignore:
Timestamp:
2019-11-29T19:38:25Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fd777a2
Parents:
38e5f36c
Message:

Introduce window focus, housed in a seat object

File:
1 edited

Legend:

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

    r38e5f36c rcf32dbd  
    3434#include "../client.h"
    3535#include "../display.h"
     36#include "../seat.h"
    3637#include "../window.h"
    3738
     
    130131}
    131132
     133/** Basic seat operation. */
     134PCUT_TEST(display_seat)
     135{
     136        ds_display_t *disp;
     137        ds_seat_t *seat;
     138        ds_seat_t *s0, *s1;
     139        errno_t rc;
     140
     141        rc = ds_display_create(NULL, &disp);
     142        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     143
     144        rc = ds_seat_create(disp, &seat);
     145        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     146
     147        s0 = ds_display_first_seat(disp);
     148        PCUT_ASSERT_EQUALS(s0, seat);
     149
     150        s1 = ds_display_next_seat(s0);
     151        PCUT_ASSERT_NULL(s1);
     152
     153        ds_seat_destroy(seat);
     154        ds_display_destroy(disp);
     155}
     156
    132157/** Test ds_display_post_kbd_event(). */
    133158PCUT_TEST(display_post_kbd_event)
    134159{
    135160        ds_display_t *disp;
     161        ds_seat_t *seat;
    136162        ds_client_t *client;
    137163        ds_window_t *wnd;
     
    141167
    142168        rc = ds_display_create(NULL, &disp);
     169        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     170
     171        rc = ds_seat_create(disp, &seat);
    143172        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    144173
     
    162191        ds_window_destroy(wnd);
    163192        ds_client_destroy(client);
     193        ds_seat_destroy(seat);
    164194        ds_display_destroy(disp);
    165195}
Note: See TracChangeset for help on using the changeset viewer.