Changeset a6492460 in mainline
- Timestamp:
- 2022-11-09T16:17:59Z (23 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 88d828e
- Parents:
- 54593f3
- Location:
- uspace
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/taskbar/taskbar.c
r54593f3 ra6492460 34 34 35 35 #include <gfx/coord.h> 36 #include <io/pos_event.h> 36 37 #include <stdio.h> 37 38 #include <stdlib.h> … … 47 48 #include "wndlist.h" 48 49 49 static void wnd_close(ui_window_t *, void *); 50 static void taskbar_wnd_close(ui_window_t *, void *); 51 static void taskbar_wnd_pos(ui_window_t *, void *, pos_event_t *); 50 52 51 53 static ui_window_cb_t window_cb = { 52 .close = wnd_close 54 .close = taskbar_wnd_close, 55 .pos = taskbar_wnd_pos 53 56 }; 54 57 … … 58 61 * @param arg Argument (taskbar) 59 62 */ 60 static void wnd_close(ui_window_t *window, void *arg)63 static void taskbar_wnd_close(ui_window_t *window, void *arg) 61 64 { 62 65 taskbar_t *taskbar = (taskbar_t *) arg; 63 66 64 67 ui_quit(taskbar->ui); 68 } 69 70 /** Window received position event. 71 * 72 * @param window Window 73 * @param arg Argument (taskbar) 74 * @param event Position event 75 */ 76 static void taskbar_wnd_pos(ui_window_t *window, void *arg, pos_event_t *event) 77 { 78 taskbar_t *taskbar = (taskbar_t *) arg; 79 80 /* Remember ID of device that sent the last event */ 81 taskbar->wndlist->ev_pos_id = event->pos_id; 82 83 ui_window_def_pos(window, event); 65 84 } 66 85 … … 130 149 } 131 150 132 ui_window_set_cb(taskbar->window, &window_cb, (void *) &taskbar);151 ui_window_set_cb(taskbar->window, &window_cb, (void *)taskbar); 133 152 ui_res = ui_window_get_res(taskbar->window); 134 153 -
uspace/app/taskbar/types/taskbar.h
r54593f3 ra6492460 37 37 #define TYPES_TASKBAR_H 38 38 39 #include <types/common.h> 39 40 #include <ui/fixed.h> 40 41 #include <ui/label.h> -
uspace/app/taskbar/types/wndlist.h
r54593f3 ra6492460 75 75 /** Window management service */ 76 76 wndmgt_t *wndmgt; 77 78 /** Position ID of last position event */ 79 sysarg_t ev_pos_id; 77 80 } wndlist_t; 78 81 -
uspace/app/taskbar/wndlist.c
r54593f3 ra6492460 448 448 * 449 449 * @param pbutton Push button 450 * @param arg Argument (w dnlist_entry_t *)450 * @param arg Argument (wndlist_entry_t *) 451 451 */ 452 452 static void wndlist_button_clicked(ui_pbutton_t *pbutton, void *arg) 453 453 { 454 454 wndlist_entry_t *entry = (wndlist_entry_t *)arg; 455 sysarg_t seat_id; 456 457 seat_id = 0; // TODO Multi-seat 455 sysarg_t dev_id; 456 457 /* ID of device that clicked the button */ 458 dev_id = entry->wndlist->ev_pos_id; 458 459 459 460 (void) wndmgt_activate_window(entry->wndlist->wndmgt, 460 seat_id, entry->wnd_id);461 dev_id, entry->wnd_id); 461 462 } 462 463 -
uspace/lib/wndmgt/src/wndmgt.c
r54593f3 ra6492460 287 287 * 288 288 * @param wndmgt Window management session 289 * @param seat_id Seat ID 289 * @param dev_id ID of input device belonging to seat whose 290 * focus is to be switched 290 291 * @param wnd_id Window ID 291 292 * @return EOK on success or an error code 292 293 */ 293 errno_t wndmgt_activate_window(wndmgt_t *wndmgt, sysarg_t seat_id,294 errno_t wndmgt_activate_window(wndmgt_t *wndmgt, sysarg_t dev_id, 294 295 sysarg_t wnd_id) 295 296 { … … 298 299 299 300 exch = async_exchange_begin(wndmgt->sess); 300 rc = async_req_2_0(exch, WNDMGT_ACTIVATE_WINDOW, seat_id,301 rc = async_req_2_0(exch, WNDMGT_ACTIVATE_WINDOW, dev_id, 301 302 wnd_id); 302 303 -
uspace/lib/wndmgt/src/wndmgt_srv.c
r54593f3 ra6492460 204 204 static void wndmgt_activate_window_srv(wndmgt_srv_t *srv, ipc_call_t *icall) 205 205 { 206 sysarg_t seat_id;206 sysarg_t dev_id; 207 207 sysarg_t wnd_id; 208 208 errno_t rc; 209 209 210 seat_id = ipc_get_arg1(icall);210 dev_id = ipc_get_arg1(icall); 211 211 wnd_id = ipc_get_arg2(icall); 212 212 … … 216 216 } 217 217 218 rc = srv->ops->activate_window(srv->arg, seat_id, wnd_id);218 rc = srv->ops->activate_window(srv->arg, dev_id, wnd_id); 219 219 async_answer_0(icall, rc); 220 220 } -
uspace/srv/hid/display/wmops.c
r54593f3 ra6492460 151 151 * 152 152 * @param arg Argument (WM client) 153 * @param seat_id SeatID153 * @param dev_id Input device ID 154 154 * @param wnd_id Window ID 155 155 * @return EOK on success or an error code 156 156 */ 157 static errno_t dispwm_activate_window(void *arg, sysarg_t seat_id,157 static errno_t dispwm_activate_window(void *arg, sysarg_t dev_id, 158 158 sysarg_t wnd_id) 159 159 { … … 172 172 173 173 // TODO Multi-seat 174 (void) seat_id;174 (void) dev_id; 175 175 seat = ds_display_first_seat(wnd->display); 176 176
Note:
See TracChangeset
for help on using the changeset viewer.