Changeset b4b4dafe in mainline for uspace/srv/hid/display/test/seat.c
- Timestamp:
- 2021-06-03T14:02:59Z (3 years ago)
- Children:
- 2e6394e
- Parents:
- 6baab83
- git-author:
- Jiri Svoboda <jiri@…> (2021-06-02 17:00:03)
- git-committer:
- Jiri Svoboda <jiri@…> (2021-06-03 14:02:59)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/test/seat.c
r6baab83 rb4b4dafe 1 1 /* 2 * Copyright (c) 20 19Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 126 126 called_cb = false; 127 127 128 ds_seat_evac_ focus(seat, w1);128 ds_seat_evac_wnd_refs(seat, w1); 129 129 PCUT_ASSERT_EQUALS(w0, seat->focus); 130 130 PCUT_ASSERT_TRUE(called_cb); … … 172 172 called_cb = false; 173 173 174 ds_seat_evac_ focus(seat, wnd);174 ds_seat_evac_wnd_refs(seat, wnd); 175 175 PCUT_ASSERT_NULL(seat->focus); 176 176 PCUT_ASSERT_TRUE(called_cb); 177 178 ds_window_destroy(wnd); 179 ds_seat_destroy(seat); 180 ds_client_destroy(client); 181 ds_display_destroy(disp); 182 } 183 184 /** Evacuate popup reference from window. 185 * 186 * After evacuating no window should be set as the popup 187 */ 188 PCUT_TEST(evac_popup) 189 { 190 ds_display_t *disp; 191 ds_client_t *client; 192 ds_seat_t *seat; 193 ds_window_t *wnd; 194 display_wnd_params_t params; 195 bool called_cb = false; 196 errno_t rc; 197 198 rc = ds_display_create(NULL, df_none, &disp); 199 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 200 201 rc = ds_client_create(disp, &test_ds_client_cb, &called_cb, &client); 202 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 203 204 rc = ds_seat_create(disp, &seat); 205 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 206 207 display_wnd_params_init(¶ms); 208 params.rect.p0.x = params.rect.p0.y = 0; 209 params.rect.p1.x = params.rect.p1.y = 1; 210 params.flags |= wndf_popup; 211 212 rc = ds_window_create(client, ¶ms, &wnd); 213 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 214 215 PCUT_ASSERT_EQUALS(wnd, seat->popup); 216 217 ds_seat_evac_wnd_refs(seat, wnd); 218 PCUT_ASSERT_NULL(seat->popup); 177 219 178 220 ds_window_destroy(wnd); … … 436 478 w1->dpos.y = 400; 437 479 438 PCUT_ASSERT_FALSE(called_cb); 480 /* New window gets focused event */ 481 PCUT_ASSERT_TRUE(called_cb); 482 483 called_cb = false; 439 484 440 485 ds_seat_set_focus(seat, w0);
Note:
See TracChangeset
for help on using the changeset viewer.