Ignore:
Timestamp:
2020-02-28T15:44:55Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a8eed5f
Parents:
2a515dcd
git-author:
Jiri Svoboda <jiri@…> (2020-02-26 18:26:13)
git-committer:
Jiri Svoboda <jiri@…> (2020-02-28 15:44:55)
Message:

Window resize by client request

File:
1 edited

Legend:

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

    r2a515dcd r0e6e77f  
    5353        printf("test_ds_ev_pending\n");
    5454        *called_cb = true;
    55 
    5655}
    5756
     
    265264        event.c = L'\0';
    266265
    267         PCUT_ASSERT_FALSE(called_cb);
     266        called_cb = false;
    268267
    269268        rc = ds_display_post_kbd_event(disp, &event);
     
    316315        event.c = L'\0';
    317316
    318         PCUT_ASSERT_FALSE(called_cb);
     317        called_cb = false;
    319318
    320319        rc = ds_display_post_kbd_event(disp, &event);
    321320        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    322         PCUT_ASSERT_FALSE(called_cb);
     321
     322        /* Got gocus/unfocus events */
     323        PCUT_ASSERT_TRUE(called_cb);
    323324
    324325        /* Next window should be focused */
    325326        PCUT_ASSERT_EQUALS(w1, seat->focus);
    326327
     328        called_cb = false;
     329
    327330        rc = ds_display_post_kbd_event(disp, &event);
    328331        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    329         PCUT_ASSERT_FALSE(called_cb);
     332
     333        /* Got gocus/unfocus events */
     334        PCUT_ASSERT_TRUE(called_cb);
    330335
    331336        /* Focus should be back to the first window */
     
    361366        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    362367
     368        /*
     369         * For PTD_MOVE to work we need to set display dimensions (as pointer
     370         * move is clipped to the display rectangle. Here we do it directly
     371         * instead of adding a display device.
     372         */
     373        disp->rect.p0.x = 0;
     374        disp->rect.p0.y = 0;
     375        disp->rect.p1.x = 500;
     376        disp->rect.p1.y = 500;
     377
    363378        display_wnd_params_init(&params);
    364379        params.rect.p0.x = params.rect.p0.y = 0;
Note: See TracChangeset for help on using the changeset viewer.