Changeset d8503fd in mainline
- Timestamp:
- 2023-01-09T21:14:04Z (2 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 46b02cb
- Parents:
- e04b72d6
- Location:
- uspace
- Files:
-
- 8 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/meson.build
re04b72d6 rd8503fd 39 39 'devctl', 40 40 'df', 41 'disp', 41 42 'dnscfg', 42 43 'dnsres', -
uspace/srv/hid/display/display.c
re04b72d6 rd8503fd 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 98 98 list_initialize(&disp->clients); 99 99 list_initialize(&disp->wmclients); 100 list_initialize(&disp->cfgclients); 100 101 disp->next_wnd_id = 1; 101 102 list_initialize(&disp->ddevs); … … 120 121 assert(list_empty(&disp->clients)); 121 122 assert(list_empty(&disp->wmclients)); 123 assert(list_empty(&disp->cfgclients)); 122 124 assert(list_empty(&disp->seats)); 123 125 assert(list_empty(&disp->ddevs)); … … 241 243 list_remove(&wmclient->lwmclients); 242 244 wmclient->display = NULL; 245 } 246 247 /** Add CFG client to display. 248 * 249 * @param disp Display 250 * @param cfgclient CFG client 251 */ 252 void ds_display_add_cfgclient(ds_display_t *disp, ds_cfgclient_t *cfgclient) 253 { 254 assert(cfgclient->display == NULL); 255 assert(!link_used(&cfgclient->lcfgclients)); 256 257 cfgclient->display = disp; 258 list_append(&cfgclient->lcfgclients, &disp->cfgclients); 259 } 260 261 /** Remove CFG client from display. 262 * 263 * @param cfgclient CFG client 264 */ 265 void ds_display_remove_cfgclient(ds_cfgclient_t *cfgclient) 266 { 267 list_remove(&cfgclient->lcfgclients); 268 cfgclient->display = NULL; 243 269 } 244 270 … … 525 551 526 552 seat->display = disp; 553 seat->id = disp->next_seat_id++; 527 554 list_append(&seat->lseats, &disp->seats); 528 555 } … … 566 593 567 594 return list_get_instance(link, ds_seat_t, lseats); 595 } 596 597 /** Find seat by ID. 598 * 599 * @param display Display 600 * @param id Seat ID 601 */ 602 ds_seat_t *ds_display_find_seat(ds_display_t *display, ds_seat_id_t id) 603 { 604 ds_seat_t *seat; 605 606 seat = ds_display_first_seat(display); 607 while (seat != NULL) { 608 if (seat->id == id) 609 return seat; 610 611 seat = ds_display_next_seat(seat); 612 } 613 614 return NULL; 568 615 } 569 616 -
uspace/srv/hid/display/display.h
re04b72d6 rd8503fd 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 42 42 #include <gfx/coord.h> 43 43 #include <io/kbd_event.h> 44 #include "types/display/cfgclient.h" 44 45 #include "types/display/client.h" 45 46 #include "types/display/cursor.h" … … 63 64 extern void ds_display_add_wmclient(ds_display_t *, ds_wmclient_t *); 64 65 extern void ds_display_remove_wmclient(ds_wmclient_t *); 66 extern void ds_display_add_cfgclient(ds_display_t *, ds_cfgclient_t *); 67 extern void ds_display_remove_cfgclient(ds_cfgclient_t *); 65 68 extern ds_wmclient_t *ds_display_first_wmclient(ds_display_t *); 66 69 extern ds_wmclient_t *ds_display_next_wmclient(ds_wmclient_t *); … … 81 84 extern ds_seat_t *ds_display_first_seat(ds_display_t *); 82 85 extern ds_seat_t *ds_display_next_seat(ds_seat_t *); 86 extern ds_seat_t *ds_display_find_seat(ds_display_t *, ds_seat_id_t); 83 87 extern ds_seat_t *ds_display_seat_by_idev(ds_display_t *, ds_idev_id_t); 84 88 extern errno_t ds_display_add_ddev(ds_display_t *, ds_ddev_t *); -
uspace/srv/hid/display/main.c
re04b72d6 rd8503fd 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 36 36 #include <async.h> 37 37 #include <disp_srv.h> 38 #include <dispcfg_srv.h> 38 39 #include <errno.h> 39 40 #include <gfx/context.h> … … 48 49 #include <task.h> 49 50 #include <wndmgt_srv.h> 51 #include "cfgclient.h" 52 #include "cfgops.h" 50 53 #include "client.h" 51 54 #include "display.h" … … 62 65 static void display_client_ev_pending(void *); 63 66 static void display_wmclient_ev_pending(void *); 67 static void display_cfgclient_ev_pending(void *); 64 68 static void display_gc_conn(ipc_call_t *, void *); 65 69 static void display_wndmgt_conn(ipc_call_t *, void *); 70 static void display_dispcfg_conn(ipc_call_t *, void *); 66 71 67 72 #ifdef CONFIG_DISP_DOUBLE_BUF … … 86 91 }; 87 92 93 static ds_cfgclient_cb_t display_cfgclient_cb = { 94 .ev_pending = display_cfgclient_ev_pending 95 }; 96 88 97 static void display_client_ev_pending(void *arg) 89 98 { … … 98 107 99 108 wndmgt_srv_ev_pending(srv); 109 } 110 111 static void display_cfgclient_ev_pending(void *arg) 112 { 113 dispcfg_srv_t *srv = (dispcfg_srv_t *) arg; 114 115 dispcfg_srv_ev_pending(srv); 100 116 } 101 117 … … 110 126 port_id_t gc_port; 111 127 port_id_t wm_port; 128 port_id_t dc_port; 112 129 errno_t rc; 113 130 … … 118 135 goto error; 119 136 120 rc = ds_seat_create(disp, &seat);137 rc = ds_seat_create(disp, "Alice", &seat); 121 138 if (rc != EOK) 122 139 goto error; … … 146 163 rc = async_create_port(INTERFACE_WNDMGT, display_wndmgt_conn, disp, 147 164 &wm_port); 165 if (rc != EOK) 166 goto error; 167 168 rc = async_create_port(INTERFACE_DISPCFG, display_dispcfg_conn, disp, 169 &dc_port); 148 170 if (rc != EOK) 149 171 goto error; … … 170 192 // XXX destroy gc_port 171 193 // XXX destroy wm_port 194 // XXX destroy dc_port 172 195 #if 0 173 196 if (disp->input != NULL) … … 284 307 } 285 308 309 /** Handle configuration connection to display server */ 310 static void display_dispcfg_conn(ipc_call_t *icall, void *arg) 311 { 312 ds_display_t *disp = (ds_display_t *) arg; 313 errno_t rc; 314 dispcfg_srv_t srv; 315 ds_cfgclient_t *cfgclient = NULL; 316 317 /* Create CFG client object */ 318 ds_display_lock(disp); 319 rc = ds_cfgclient_create(disp, &display_cfgclient_cb, &srv, &cfgclient); 320 ds_display_unlock(disp); 321 if (rc != EOK) { 322 async_answer_0(icall, ENOMEM); 323 return; 324 } 325 326 /* Set up protocol structure */ 327 dispcfg_srv_initialize(&srv); 328 srv.ops = &dispcfg_srv_ops; 329 srv.arg = cfgclient; 330 331 /* Handle connection */ 332 dispcfg_conn(icall, &srv); 333 334 ds_display_lock(disp); 335 ds_cfgclient_destroy(cfgclient); 336 ds_display_unlock(disp); 337 } 338 286 339 int main(int argc, char *argv[]) 287 340 { -
uspace/srv/hid/display/meson.build
re04b72d6 rd8503fd 1 1 # 2 # Copyright (c) 202 2Jiri Svoboda2 # Copyright (c) 2023 Jiri Svoboda 3 3 # All rights reserved. 4 4 # … … 27 27 # 28 28 29 deps = [ 'ipcgfx', 'memgfx', 'display', 'ddev', ' wndmgt' ]29 deps = [ 'ipcgfx', 'memgfx', 'display', 'ddev', 'dispcfg', 'wndmgt' ] 30 30 31 31 src = files( 32 'cfgclient.c', 33 'cfgops.c', 32 34 'client.c', 33 35 'clonegc.c', … … 47 49 48 50 test_src = files( 51 'cfgclient.c', 49 52 'client.c', 50 53 'clonegc.c', … … 56 59 'window.c', 57 60 'wmclient.c', 61 'test/cfgclient.c', 58 62 'test/client.c', 59 63 'test/clonegc.c', -
uspace/srv/hid/display/seat.c
re04b72d6 rd8503fd 39 39 #include <gfx/render.h> 40 40 #include <stdlib.h> 41 #include <str.h> 41 42 #include "client.h" 42 43 #include "cursor.h" … … 51 52 * 52 53 * @param display Parent display 54 * @param name Seat name 53 55 * @param rseat Place to store pointer to new seat. 54 56 * @return EOK on success, ENOMEM if out of memory 55 57 */ 56 errno_t ds_seat_create(ds_display_t *display, ds_seat_t **rseat) 58 errno_t ds_seat_create(ds_display_t *display, const char *name, 59 ds_seat_t **rseat) 57 60 { 58 61 ds_seat_t *seat; 62 ds_seat_t *s0; 63 64 s0 = ds_display_first_seat(display); 65 while (s0 != NULL) { 66 if (str_cmp(s0->name, name) == 0) 67 return EEXIST; 68 s0 = ds_display_next_seat(s0); 69 } 59 70 60 71 seat = calloc(1, sizeof(ds_seat_t)); … … 62 73 return ENOMEM; 63 74 75 seat->name = str_dup(name); 76 if (seat->name == NULL) { 77 free(seat); 78 return ENOMEM; 79 } 80 64 81 ds_display_add_seat(display, seat); 65 82 seat->pntpos.x = 0; … … 80 97 { 81 98 ds_display_remove_seat(seat); 99 free(seat->name); 82 100 free(seat); 83 101 } -
uspace/srv/hid/display/seat.h
re04b72d6 rd8503fd 46 46 #include "types/display/window.h" 47 47 48 extern errno_t ds_seat_create(ds_display_t *, ds_seat_t **);48 extern errno_t ds_seat_create(ds_display_t *, const char *, ds_seat_t **); 49 49 extern void ds_seat_destroy(ds_seat_t *); 50 50 extern void ds_seat_set_focus(ds_seat_t *, ds_window_t *); -
uspace/srv/hid/display/test/client.c
re04b72d6 rd8503fd 1 1 /* 2 * Copyright (c) 202 1Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 93 93 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 94 94 95 rc = ds_seat_create(disp, &seat);95 rc = ds_seat_create(disp, "Alice", &seat); 96 96 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 97 97 … … 144 144 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 145 145 146 rc = ds_seat_create(disp, &seat);146 rc = ds_seat_create(disp, "Alice", &seat); 147 147 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 148 148 … … 192 192 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 193 193 194 rc = ds_seat_create(disp, &seat);194 rc = ds_seat_create(disp, "Alice", &seat); 195 195 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 196 196 … … 250 250 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 251 251 252 rc = ds_seat_create(disp, &seat);252 rc = ds_seat_create(disp, "Alice", &seat); 253 253 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 254 254 … … 309 309 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 310 310 311 rc = ds_seat_create(disp, &seat);311 rc = ds_seat_create(disp, "Alice", &seat); 312 312 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 313 313 … … 377 377 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 378 378 379 rc = ds_seat_create(disp, &seat);379 rc = ds_seat_create(disp, "Alice", &seat); 380 380 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 381 381 … … 445 445 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 446 446 447 rc = ds_seat_create(disp, &seat);447 rc = ds_seat_create(disp, "Alice", &seat); 448 448 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 449 449 … … 514 514 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 515 515 516 rc = ds_seat_create(disp, &seat);516 rc = ds_seat_create(disp, "Alice", &seat); 517 517 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 518 518 … … 572 572 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 573 573 574 rc = ds_seat_create(disp, &seat);574 rc = ds_seat_create(disp, "Alice", &seat); 575 575 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 576 576 … … 618 618 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 619 619 620 rc = ds_seat_create(disp, &seat);620 rc = ds_seat_create(disp, "Alice", &seat); 621 621 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 622 622 -
uspace/srv/hid/display/test/display.c
re04b72d6 rd8503fd 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 32 32 #include <str.h> 33 33 34 #include "../cfgclient.h" 34 35 #include "../client.h" 35 36 #include "../display.h" … … 54 55 }; 55 56 57 static void test_ds_cfgev_pending(void *); 58 59 static ds_cfgclient_cb_t test_ds_cfgclient_cb = { 60 .ev_pending = test_ds_cfgev_pending 61 }; 62 56 63 static void test_ds_ev_pending(void *arg) 57 64 { … … 66 73 } 67 74 75 static void test_ds_cfgev_pending(void *arg) 76 { 77 bool *called_cb = (bool *) arg; 78 *called_cb = true; 79 } 80 68 81 /** Display creation and destruction. */ 69 82 PCUT_TEST(display_create_destroy) … … 123 136 124 137 ds_wmclient_destroy(wmclient); 138 ds_display_destroy(disp); 139 } 140 141 /** Basic CFG client operation. */ 142 PCUT_TEST(display_cfgclient) 143 { 144 ds_display_t *disp; 145 ds_cfgclient_t *cfgclient; 146 errno_t rc; 147 148 rc = ds_display_create(NULL, df_none, &disp); 149 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 150 151 rc = ds_cfgclient_create(disp, &test_ds_cfgclient_cb, NULL, &cfgclient); 152 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 153 154 ds_cfgclient_destroy(cfgclient); 125 155 ds_display_destroy(disp); 126 156 } … … 145 175 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 146 176 147 rc = ds_seat_create(disp, &seat);177 rc = ds_seat_create(disp, "Alice", &seat); 148 178 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 149 179 … … 216 246 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 217 247 218 rc = ds_seat_create(disp, &seat);248 rc = ds_seat_create(disp, "Alice", &seat); 219 249 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 220 250 … … 287 317 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 288 318 289 rc = ds_seat_create(disp, &seat);319 rc = ds_seat_create(disp, "Alice", &seat); 290 320 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 291 321 … … 331 361 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 332 362 333 rc = ds_seat_create(disp, &seat);363 rc = ds_seat_create(disp, "Alice", &seat); 334 364 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 335 365 … … 372 402 ds_display_t *disp; 373 403 ds_seat_t *seat; 374 ds_seat_t *s0, *s1 ;375 errno_t rc; 376 377 rc = ds_display_create(NULL, df_none, &disp); 378 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 379 380 rc = ds_seat_create(disp, &seat);404 ds_seat_t *s0, *s1, *s2; 405 errno_t rc; 406 407 rc = ds_display_create(NULL, df_none, &disp); 408 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 409 410 rc = ds_seat_create(disp, "Alice", &seat); 381 411 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 382 412 … … 386 416 s1 = ds_display_next_seat(s0); 387 417 PCUT_ASSERT_NULL(s1); 418 419 s2 = ds_display_find_seat(disp, seat->id); 420 PCUT_ASSERT_EQUALS(s2, seat); 388 421 389 422 ds_seat_destroy(seat); … … 413 446 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 414 447 415 rc = ds_seat_create(disp, &seat);448 rc = ds_seat_create(disp, "Alice", &seat); 416 449 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 417 450 … … 461 494 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 462 495 463 rc = ds_seat_create(disp, &seat);496 rc = ds_seat_create(disp, "Alice", &seat); 464 497 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 465 498 … … 529 562 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 530 563 531 rc = ds_seat_create(disp, &seat);564 rc = ds_seat_create(disp, "Alice", &seat); 532 565 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 533 566 … … 614 647 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 615 648 616 rc = ds_seat_create(disp, &seat);649 rc = ds_seat_create(disp, "Alice", &seat); 617 650 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 618 651 -
uspace/srv/hid/display/test/main.c
re04b72d6 rd8503fd 1 1 /* 2 * Copyright (c) 20 19Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 31 31 PCUT_INIT; 32 32 33 PCUT_IMPORT(cfgclient); 33 34 PCUT_IMPORT(client); 34 35 PCUT_IMPORT(clonegc); -
uspace/srv/hid/display/test/seat.c
re04b72d6 rd8503fd 70 70 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 71 71 72 rc = ds_seat_create(disp, &seat);72 rc = ds_seat_create(disp, "Alice", &seat); 73 73 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 74 74 … … 110 110 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 111 111 112 rc = ds_seat_create(disp, &seat);112 rc = ds_seat_create(disp, "Alice", &seat); 113 113 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 114 114 … … 155 155 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 156 156 157 rc = ds_seat_create(disp, &seat);157 rc = ds_seat_create(disp, "Alice", &seat); 158 158 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 159 159 … … 196 196 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 197 197 198 rc = ds_seat_create(disp, &seat);198 rc = ds_seat_create(disp, "Alice", &seat); 199 199 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 200 200 … … 245 245 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 246 246 247 rc = ds_seat_create(disp, &seat);247 rc = ds_seat_create(disp, "Alice", &seat); 248 248 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 249 249 … … 295 295 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 296 296 297 rc = ds_seat_create(disp, &seat);297 rc = ds_seat_create(disp, "Alice", &seat); 298 298 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 299 299 … … 341 341 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 342 342 343 rc = ds_seat_create(disp, &seat);343 rc = ds_seat_create(disp, "Alice", &seat); 344 344 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 345 345 … … 382 382 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 383 383 384 rc = ds_seat_create(disp, &seat);384 rc = ds_seat_create(disp, "Alice", &seat); 385 385 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 386 386 … … 431 431 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 432 432 433 rc = ds_seat_create(disp, &seat);433 rc = ds_seat_create(disp, "Alice", &seat); 434 434 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 435 435 … … 475 475 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 476 476 477 rc = ds_seat_create(disp, &seat);477 rc = ds_seat_create(disp, "Alice", &seat); 478 478 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 479 479 … … 528 528 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 529 529 530 rc = ds_seat_create(disp, &seat);530 rc = ds_seat_create(disp, "Alice", &seat); 531 531 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 532 532 … … 592 592 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 593 593 594 rc = ds_seat_create(disp, &seat);594 rc = ds_seat_create(disp, "Alice", &seat); 595 595 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 596 596 … … 688 688 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 689 689 690 rc = ds_seat_create(disp, &seat);690 rc = ds_seat_create(disp, "Alice", &seat); 691 691 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 692 692 -
uspace/srv/hid/display/test/window.c
re04b72d6 rd8503fd 67 67 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 68 68 69 rc = ds_seat_create(disp, &seat);69 rc = ds_seat_create(disp, "Alice", &seat); 70 70 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 71 71 … … 100 100 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 101 101 102 rc = ds_seat_create(disp, &seat);102 rc = ds_seat_create(disp, "Alice", &seat); 103 103 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 104 104 … … 147 147 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 148 148 149 rc = ds_seat_create(disp, &seat);149 rc = ds_seat_create(disp, "Alice", &seat); 150 150 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 151 151 … … 194 194 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 195 195 196 rc = ds_seat_create(disp, &seat);196 rc = ds_seat_create(disp, "Alice", &seat); 197 197 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 198 198 … … 235 235 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 236 236 237 rc = ds_seat_create(disp, &seat);237 rc = ds_seat_create(disp, "Alice", &seat); 238 238 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 239 239 … … 277 277 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 278 278 279 rc = ds_seat_create(disp, &seat);279 rc = ds_seat_create(disp, "Alice", &seat); 280 280 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 281 281 … … 314 314 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 315 315 316 rc = ds_seat_create(disp, &seat);316 rc = ds_seat_create(disp, "Alice", &seat); 317 317 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 318 318 … … 352 352 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 353 353 354 rc = ds_seat_create(disp, &seat);354 rc = ds_seat_create(disp, "Alice", &seat); 355 355 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 356 356 … … 392 392 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 393 393 394 rc = ds_seat_create(disp, &seat);394 rc = ds_seat_create(disp, "Alice", &seat); 395 395 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 396 396 … … 436 436 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 437 437 438 rc = ds_seat_create(disp, &seat);438 rc = ds_seat_create(disp, "Alice", &seat); 439 439 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 440 440 … … 471 471 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 472 472 473 rc = ds_seat_create(disp, &seat);473 rc = ds_seat_create(disp, "Alice", &seat); 474 474 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 475 475 … … 516 516 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 517 517 518 rc = ds_seat_create(disp, &seat);518 rc = ds_seat_create(disp, "Alice", &seat); 519 519 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 520 520 … … 571 571 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 572 572 573 rc = ds_seat_create(disp, &seat);573 rc = ds_seat_create(disp, "Alice", &seat); 574 574 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 575 575 … … 643 643 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 644 644 645 rc = ds_seat_create(disp, &seat);645 rc = ds_seat_create(disp, "Alice", &seat); 646 646 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 647 647 … … 682 682 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 683 683 684 rc = ds_seat_create(disp, &seat);684 rc = ds_seat_create(disp, "Alice", &seat); 685 685 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 686 686 … … 722 722 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 723 723 724 rc = ds_seat_create(disp, &seat);724 rc = ds_seat_create(disp, "Alice", &seat); 725 725 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 726 726 … … 769 769 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 770 770 771 rc = ds_seat_create(disp, &seat);771 rc = ds_seat_create(disp, "Alice", &seat); 772 772 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 773 773 … … 816 816 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 817 817 818 rc = ds_seat_create(disp, &seat);818 rc = ds_seat_create(disp, "Alice", &seat); 819 819 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 820 820 … … 1086 1086 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1087 1087 1088 rc = ds_seat_create(disp, &seat);1088 rc = ds_seat_create(disp, "Alice", &seat); 1089 1089 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1090 1090 … … 1140 1140 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1141 1141 1142 rc = ds_seat_create(disp, &seat);1142 rc = ds_seat_create(disp, "Alice", &seat); 1143 1143 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1144 1144 … … 1185 1185 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1186 1186 1187 rc = ds_seat_create(disp, &seat);1187 rc = ds_seat_create(disp, "Alice", &seat); 1188 1188 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1189 1189 … … 1241 1241 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1242 1242 1243 rc = ds_seat_create(disp, &seat);1243 rc = ds_seat_create(disp, "Alice", &seat); 1244 1244 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1245 1245 -
uspace/srv/hid/display/types/display/display.h
re04b72d6 rd8503fd 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 46 46 #include "cursor.h" 47 47 #include "clonegc.h" 48 #include "seat.h" 48 49 #include "window.h" 49 50 … … 64 65 /** WM clients (of ds_wmclient_t) */ 65 66 list_t wmclients; 67 /** CFG clients (of ds_cfgclient_t) */ 68 list_t cfgclients; 66 69 67 70 /** Next ID to assign to a window. … … 73 76 */ 74 77 ds_wnd_id_t next_wnd_id; 78 /** Next ID to assign to a seat */ 79 ds_seat_id_t next_seat_id; 75 80 /** Input service */ 76 81 input_t *input; -
uspace/srv/hid/display/types/display/seat.h
re04b72d6 rd8503fd 1 1 /* 2 * Copyright (c) 202 1Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 40 40 #include <gfx/coord.h> 41 41 42 typedef sysarg_t ds_seat_id_t; 43 42 44 /** Display server seat */ 43 45 typedef struct ds_seat { … … 46 48 /** Link to display->seats */ 47 49 link_t lseats; 50 /** Seat ID */ 51 ds_seat_id_t id; 52 /** Seat name */ 53 char *name; 48 54 /** Window this seat is focused on */ 49 55 struct ds_window *focus; -
uspace/srv/hid/display/wmclient.c
re04b72d6 rd8503fd 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 36 36 #include <adt/list.h> 37 37 #include <errno.h> 38 #include <io/log.h> 38 39 #include <stdlib.h> 39 40 #include "display.h" … … 122 123 } 123 124 } 124 #include <io/log.h> 125 125 126 /** Post window added event to the WM client's message queue. 126 127 *
Note:
See TracChangeset
for help on using the changeset viewer.