Changeset b0ae23f in mainline for uspace/lib/ui/src/window.c


Ignore:
Timestamp:
2023-01-17T15:21:13Z (2 years 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/ui/src/window.c

    r46a47c0 rb0ae23f  
    8080static void wd_move(ui_wdecor_t *, void *, gfx_coord2_t *);
    8181static void wd_resize(ui_wdecor_t *, void *, ui_wdecor_rsztype_t,
    82     gfx_coord2_t *);
     82    gfx_coord2_t *, sysarg_t);
    8383static void wd_set_cursor(ui_wdecor_t *, void *, ui_stock_cursor_t);
    8484
     
    988988 * @param rsztype Resize type
    989989 * @param pos Position where the button was pressed
     990 * @param pos_id Positioning device ID
    990991 */
    991992static void wd_resize(ui_wdecor_t *wdecor, void *arg,
    992     ui_wdecor_rsztype_t rsztype, gfx_coord2_t *pos)
    993 {
    994         ui_window_t *window = (ui_window_t *) arg;
    995 
    996         if (window->dwindow != NULL)
    997                 (void) display_window_resize_req(window->dwindow, rsztype, pos);
     993    ui_wdecor_rsztype_t rsztype, gfx_coord2_t *pos, sysarg_t pos_id)
     994{
     995        ui_window_t *window = (ui_window_t *) arg;
     996
     997        if (window->dwindow != NULL) {
     998                (void) display_window_resize_req(window->dwindow, rsztype,
     999                    pos, pos_id);
     1000        }
    9981001}
    9991002
Note: See TracChangeset for help on using the changeset viewer.