Changeset 3a6d44b7 in mainline for uspace/lib/wndmgt/src


Ignore:
Timestamp:
2022-11-07T17:42:51Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
60ebe63
Parents:
f1f433d
Message:

Activate window by pushing window button on taskbar

Note that with multiple seats, one would need to know which seat pushed
the button and set the appropriate focus.

Location:
uspace/lib/wndmgt/src
Files:
2 edited

Legend:

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

    rf1f433d r3a6d44b7  
    287287 *
    288288 * @param wndmgt Window management session
     289 * @param seat_id Seat ID
    289290 * @param wnd_id Window ID
    290291 * @return EOK on success or an error code
    291292 */
    292 errno_t wndmgt_activate_window(wndmgt_t *wndmgt, sysarg_t wnd_id)
     293errno_t wndmgt_activate_window(wndmgt_t *wndmgt, sysarg_t seat_id,
     294    sysarg_t wnd_id)
    293295{
    294296        async_exch_t *exch;
     
    296298
    297299        exch = async_exchange_begin(wndmgt->sess);
    298         rc = async_req_1_0(exch, WNDMGT_ACTIVATE_WINDOW, wnd_id);
     300        rc = async_req_2_0(exch, WNDMGT_ACTIVATE_WINDOW, seat_id,
     301            wnd_id);
    299302
    300303        async_exchange_end(exch);
  • uspace/lib/wndmgt/src/wndmgt_srv.c

    rf1f433d r3a6d44b7  
    204204static void wndmgt_activate_window_srv(wndmgt_srv_t *srv, ipc_call_t *icall)
    205205{
     206        sysarg_t seat_id;
    206207        sysarg_t wnd_id;
    207208        errno_t rc;
    208209
    209         wnd_id = ipc_get_arg1(icall);
     210        seat_id = ipc_get_arg1(icall);
     211        wnd_id = ipc_get_arg2(icall);
    210212
    211213        if (srv->ops->activate_window == NULL) {
     
    214216        }
    215217
    216         rc = srv->ops->activate_window(srv->arg, wnd_id);
     218        rc = srv->ops->activate_window(srv->arg, seat_id, wnd_id);
    217219        async_answer_0(icall, rc);
    218220}
Note: See TracChangeset for help on using the changeset viewer.