Changeset 46a47c0 in mainline for uspace/srv/hid/display/test/client.c


Ignore:
Timestamp:
2023-01-16T20:34:01Z (2 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b0ae23f
Parents:
b3eeae5
Message:

Make sure window is only show as inactive when it loses last focus

This currently affects the title bar and also the cursor in Terminal.

File:
1 edited

Legend:

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

    rb3eeae5 r46a47c0  
    240240        display_wnd_params_t params;
    241241        ds_window_t *rwindow;
     242        display_wnd_focus_ev_t efocus;
    242243        display_wnd_ev_t revent;
    243244        bool called_cb = NULL;
     
    271272        PCUT_ASSERT_ERRNO_VAL(ENOENT, rc);
    272273
    273         rc = ds_client_post_focus_event(client, wnd);
     274        efocus.nfocus = 42;
     275
     276        rc = ds_client_post_focus_event(client, wnd, &efocus);
    274277        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    275278        PCUT_ASSERT_TRUE(called_cb);
     
    279282        PCUT_ASSERT_EQUALS(wnd, rwindow);
    280283        PCUT_ASSERT_EQUALS(wev_focus, revent.etype);
     284        PCUT_ASSERT_INT_EQUALS(efocus.nfocus, revent.ev.focus.nfocus);
    281285
    282286        rc = ds_client_get_event(client, &rwindow, &revent);
     
    504508        display_wnd_params_t params;
    505509        ds_window_t *rwindow;
     510        display_wnd_unfocus_ev_t eunfocus;
    506511        display_wnd_ev_t revent;
    507512        bool called_cb = NULL;
     
    535540        PCUT_ASSERT_ERRNO_VAL(ENOENT, rc);
    536541
    537         rc = ds_client_post_unfocus_event(client, wnd);
     542        eunfocus.nfocus = 42;
     543
     544        rc = ds_client_post_unfocus_event(client, wnd, &eunfocus);
    538545        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    539546        PCUT_ASSERT_TRUE(called_cb);
     
    543550        PCUT_ASSERT_EQUALS(wnd, rwindow);
    544551        PCUT_ASSERT_EQUALS(wev_unfocus, revent.etype);
     552        PCUT_ASSERT_INT_EQUALS(eunfocus.nfocus, revent.ev.unfocus.nfocus);
    545553
    546554        rc = ds_client_get_event(client, &rwindow, &revent);
Note: See TracChangeset for help on using the changeset viewer.