Changeset 0680854 in mainline for uspace/lib/display/src/display.c


Ignore:
Timestamp:
2020-03-20T15:42:27Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0b7e394
Parents:
aeb3037
git-author:
Jiri Svoboda <jiri@…> (2020-03-19 19:42:21)
git-committer:
Jiri Svoboda <jiri@…> (2020-03-20 15:42:27)
Message:

Moving window by client request, emulate window placement flags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/display/src/display.c

    raeb3037 r0680854  
    277277}
    278278
     279/** Move display window.
     280 *
     281 * Set new display position of a window. Display position determines where
     282 * the origin of the window coordinate system lies. Note that the top left
     283 * corner of the window need not coincide with the window's 0,0 point.
     284 *
     285 * @param window Window
     286 * @param dpos New display position
     287 * @return EOK on success or an error code
     288 */
     289errno_t display_window_move(display_window_t *window, gfx_coord2_t *dpos)
     290{
     291        async_exch_t *exch;
     292        aid_t req;
     293        ipc_call_t answer;
     294        errno_t rc;
     295
     296        exch = async_exchange_begin(window->display->sess);
     297        req = async_send_1(exch, DISPLAY_WINDOW_MOVE, window->id, &answer);
     298        rc = async_data_write_start(exch, dpos, sizeof (gfx_coord2_t));
     299        async_exchange_end(exch);
     300        if (rc != EOK) {
     301                async_forget(req);
     302                return rc;
     303        }
     304
     305        async_wait_for(req, &rc);
     306        if (rc != EOK)
     307                return rc;
     308
     309        return EOK;
     310}
     311
     312
    279313/** Request a window resize.
    280314 *
Note: See TracChangeset for help on using the changeset viewer.