Changeset b0ae23f in mainline for uspace/lib/display/src/display.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/lib/display/src/display.c

    r46a47c0 rb0ae23f  
    414414 * @param rsztype Resize type (which part of window frame is being dragged)
    415415 * @param pos Position in the window where the button was pressed
     416 * @param pos_id Positioning device ID
    416417 * @return EOK on success or an error code
    417418 */
    418419errno_t display_window_resize_req(display_window_t *window,
    419     display_wnd_rsztype_t rsztype, gfx_coord2_t *pos)
    420 {
    421         async_exch_t *exch;
    422         aid_t req;
    423         ipc_call_t answer;
    424         errno_t rc;
    425 
    426         exch = async_exchange_begin(window->display->sess);
    427         req = async_send_2(exch, DISPLAY_WINDOW_RESIZE_REQ, window->id,
    428             (sysarg_t) rsztype, &answer);
     420    display_wnd_rsztype_t rsztype, gfx_coord2_t *pos, sysarg_t pos_id)
     421{
     422        async_exch_t *exch;
     423        aid_t req;
     424        ipc_call_t answer;
     425        errno_t rc;
     426
     427        exch = async_exchange_begin(window->display->sess);
     428        req = async_send_3(exch, DISPLAY_WINDOW_RESIZE_REQ, window->id,
     429            (sysarg_t) rsztype, pos_id, &answer);
    429430        rc = async_data_write_start(exch, (void *)pos, sizeof (gfx_coord2_t));
    430431        async_exchange_end(exch);
Note: See TracChangeset for help on using the changeset viewer.