Changeset 9901f267 in mainline for uspace/srv/hid/display/test


Ignore:
Timestamp:
2020-05-22T10:38:52Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ef20a91
Parents:
9242ad9
git-author:
Jiri Svoboda <jiri@…> (2020-05-21 17:38:41)
git-committer:
Jiri Svoboda <jiri@…> (2020-05-22 10:38:52)
Message:

Display server needs to override cursor when resizing windows

Although the pointer moves, the window is not resized until button
is released. Therefore we need override the cursor from what it
would be just based on where the pointer is located.

Location:
uspace/srv/hid/display/test
Files:
2 edited

Legend:

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

    r9242ad9 r9901f267  
    353353}
    354354
     355/** Set WM cursor */
     356PCUT_TEST(set_wm_cursor)
     357{
     358        ds_display_t *disp;
     359        ds_client_t *client;
     360        ds_seat_t *seat;
     361        bool called_cb = false;
     362        errno_t rc;
     363
     364        rc = ds_display_create(NULL, &disp);
     365        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     366
     367        rc = ds_client_create(disp, &test_ds_client_cb, &called_cb, &client);
     368        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     369
     370        rc = ds_seat_create(disp, &seat);
     371        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     372
     373        ds_seat_set_wm_cursor(seat, disp->cursor[dcurs_size_ud]);
     374        ds_seat_set_wm_cursor(seat, NULL);
     375
     376        ds_seat_destroy(seat);
     377        ds_client_destroy(client);
     378        ds_display_destroy(disp);
     379}
     380
    355381PCUT_EXPORT(seat);
  • uspace/srv/hid/display/test/window.c

    r9242ad9 r9901f267  
    3636#include "../client.h"
    3737#include "../display.h"
     38#include "../seat.h"
    3839#include "../window.h"
    3940
     
    5556        ds_display_t *disp;
    5657        ds_client_t *client;
     58        ds_seat_t *seat;
    5759        ds_window_t *wnd;
    5860        display_wnd_params_t params;
     
    6567
    6668        rc = ds_client_create(disp, NULL, NULL, &client);
     69        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     70
     71        rc = ds_seat_create(disp, &seat);
    6772        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    6873
     
    8994
    9095        ds_window_destroy(wnd);
     96        ds_seat_destroy(seat);
    9197        ds_client_destroy(client);
    9298        ds_display_destroy(disp);
     
    288294        ds_display_t *disp;
    289295        ds_client_t *client;
     296        ds_seat_t *seat;
    290297        ds_window_t *wnd;
    291298        display_wnd_params_t params;
     
    300307
    301308        rc = ds_client_create(disp, NULL, NULL, &client);
     309        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     310
     311        rc = ds_seat_create(disp, &seat);
    302312        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    303313
     
    321331
    322332        ds_window_destroy(wnd);
     333        ds_seat_destroy(seat);
    323334        ds_client_destroy(client);
    324335        ds_display_destroy(disp);
     
    639650}
    640651
    641 
    642652static errno_t dummy_set_color(void *arg, gfx_color_t *color)
    643653{
Note: See TracChangeset for help on using the changeset viewer.