Changeset b0ae23f in mainline for uspace/srv/hid/display/dsops.c


Ignore:
Timestamp:
2023-01-17T15:21:13Z (15 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0d4afe
Parents:
46a47c0
git-author:
Jiri Svoboda <jiri@…> (2023-01-17 18:21:02)
git-committer:
Jiri Svoboda <jiri@…> (2023-01-17 15:21:13)
Message:

Change the correct pointer's shape when resizing window

The request to resize a window originates from the client. The display
server forces the cursor to a double-arrow shape regardless of whether
it is over the window or not, until the resize is done. This is to
make sure the cursor keeps that shape even if it moves outside of
the current boundaries of the window. With multiple pointers we need
to know which one to change. This is done by passing the pos_id from
button press event that starts the resize all the way to
ds_window_start_resize(). Then it needs to be stored in the window
structure for use when it is time to restore the cursor.

File:
1 edited

Legend:

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

    r46a47c0 rb0ae23f  
    11/*
    2  * Copyright (c) 2022 Jiri Svoboda
     2 * Copyright (c) 2023 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    5151static errno_t disp_window_get_max_rect(void *, sysarg_t, gfx_rect_t *);
    5252static errno_t disp_window_resize_req(void *, sysarg_t,
    53     display_wnd_rsztype_t, gfx_coord2_t *);
     53    display_wnd_rsztype_t, gfx_coord2_t *, sysarg_t);
    5454static errno_t disp_window_resize(void *, sysarg_t, gfx_coord2_t *,
    5555    gfx_rect_t *);
     
    206206
    207207static errno_t disp_window_resize_req(void *arg, sysarg_t wnd_id,
    208     display_wnd_rsztype_t rsztype, gfx_coord2_t *pos)
     208    display_wnd_rsztype_t rsztype, gfx_coord2_t *pos, sysarg_t pos_id)
    209209{
    210210        ds_client_t *client = (ds_client_t *) arg;
     
    223223
    224224        log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_resize_req()");
    225         ds_window_resize_req(wnd, rsztype, pos);
     225        ds_window_resize_req(wnd, rsztype, pos, pos_id);
    226226        ds_display_unlock(client->display);
    227227        return EOK;
Note: See TracChangeset for help on using the changeset viewer.