Ignore:
Timestamp:
2019-12-11T16:58:30Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4d9c807
Parents:
5bded44
Message:

Movement events from input server, display pointer, focus by click again

File:
1 edited

Legend:

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

    r5bded44 r4fbdc3d  
    309309}
    310310
    311 /** Test ds_display_post_pos_event() with click on window switches focus
     311/** Test ds_display_post_ptd_event() with click on window switches focus
    312312 */
    313 PCUT_TEST(display_post_pos_event_wnd_switch)
     313PCUT_TEST(display_post_ptd_event_wnd_switch)
    314314{
    315315        ds_display_t *disp;
     
    317317        ds_client_t *client;
    318318        ds_window_t *w0, *w1;
    319         pos_event_t event;
     319        ptd_event_t event;
    320320        bool called_cb = false;
    321321        errno_t rc;
     
    342342        w1->dpos.y = 400;
    343343
     344        PCUT_ASSERT_FALSE(called_cb);
     345
    344346        ds_seat_set_focus(seat, w0);
    345347
    346         event.type = POS_PRESS;
     348        event.type = PTD_MOVE;
     349        event.dmove.x = 400;
     350        event.dmove.y = 400;
     351        rc = ds_display_post_ptd_event(disp, &event);
     352        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     353        PCUT_ASSERT_FALSE(called_cb);
     354
     355        event.type = PTD_PRESS;
    347356        event.btn_num = 1;
    348 
    349         PCUT_ASSERT_FALSE(called_cb);
    350 
    351         event.hpos = 400;
    352         event.vpos = 400;
    353         rc = ds_display_post_pos_event(disp, &event);
     357        rc = ds_display_post_ptd_event(disp, &event);
    354358        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    355359        PCUT_ASSERT_FALSE(called_cb);
     
    357361        PCUT_ASSERT_EQUALS(w1, seat->focus);
    358362
    359         event.hpos = 10;
    360         event.vpos = 10;
    361         rc = ds_display_post_pos_event(disp, &event);
     363        event.type = PTD_MOVE;
     364        event.dmove.x = -400;
     365        event.dmove.y = -400;
     366        rc = ds_display_post_ptd_event(disp, &event);
     367        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     368        PCUT_ASSERT_FALSE(called_cb);
     369
     370        event.type = PTD_PRESS;
     371        event.btn_num = 1;
     372        rc = ds_display_post_ptd_event(disp, &event);
    362373        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    363374        PCUT_ASSERT_FALSE(called_cb);
Note: See TracChangeset for help on using the changeset viewer.