Changeset 3be5366 in mainline for uspace/lib/ui/src/wdecor.c


Ignore:
Timestamp:
2023-01-19T12:09:34Z (15 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6828a56
Parents:
aaa3b855
git-author:
Jiri Svoboda <jiri@…> (2023-01-19 18:09:23)
git-committer:
Jiri Svoboda <jiri@…> (2023-01-19 12:09:34)
Message:

Add pos_id information to move request, too

This will become useful momentarily.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/wdecor.c

    raaa3b855 r3be5366  
    465465 * @param wdecor Window decoration
    466466 * @param pos Position where the title bar was pressed
    467  */
    468 void ui_wdecor_move(ui_wdecor_t *wdecor, gfx_coord2_t *pos)
     467 * @param pos_id Positioning device ID
     468 */
     469void ui_wdecor_move(ui_wdecor_t *wdecor, gfx_coord2_t *pos, sysarg_t pos_id)
    469470{
    470471        if (wdecor->cb != NULL && wdecor->cb->move != NULL)
    471                 wdecor->cb->move(wdecor, wdecor->arg, pos);
     472                wdecor->cb->move(wdecor, wdecor->arg, pos, pos_id);
    472473}
    473474
     
    812813{
    813814        gfx_coord2_t pos;
     815        sysarg_t pos_id;
    814816        ui_wdecor_rsztype_t rsztype;
    815817        ui_stock_cursor_t cursor;
     
    817819        pos.x = event->hpos;
    818820        pos.y = event->vpos;
     821        pos_id = event->pos_id;
    819822
    820823        /* Set appropriate resizing cursor, or set arrow cursor */
     
    827830        /* Press on window border? */
    828831        if (rsztype != ui_wr_none && event->type == POS_PRESS)
    829                 ui_wdecor_resize(wdecor, rsztype, &pos, event->pos_id);
     832                ui_wdecor_resize(wdecor, rsztype, &pos, pos_id);
    830833}
    831834
     
    839842{
    840843        gfx_coord2_t pos;
     844        sysarg_t pos_id;
    841845        ui_wdecor_geom_t geom;
    842846        ui_evclaim_t claim;
     
    844848        pos.x = event->hpos;
    845849        pos.y = event->vpos;
     850        pos_id = event->pos_id;
    846851
    847852        ui_wdecor_get_geom(wdecor, &geom);
     
    870875                if (event->type == POS_PRESS &&
    871876                    gfx_pix_inside_rect(&pos, &geom.title_bar_rect)) {
    872                         ui_wdecor_move(wdecor, &pos);
     877                        ui_wdecor_move(wdecor, &pos, pos_id);
    873878                        return ui_claimed;
    874879                }
Note: See TracChangeset for help on using the changeset viewer.