Changeset d92b8e8f in mainline for uspace/app/taskbar/taskbar.c
- Timestamp:
- 2024-03-04T14:12:26Z (14 months ago)
- Branches:
- master
- Children:
- e229148
- Parents:
- ee3b28a9
- git-author:
- Jiri Svoboda <jiri@…> (2024-03-03 18:12:02)
- git-committer:
- Jiri Svoboda <jiri@…> (2024-03-04 14:12:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/taskbar/taskbar.c
ree3b28a9 rd92b8e8f 131 131 gfx_rect_t scr_rect; 132 132 gfx_rect_t rect; 133 char *dspec = NULL; 134 char *qmark; 133 135 errno_t rc; 134 136 135 137 taskbar = calloc(1, sizeof(taskbar_t)); 136 138 if (taskbar == NULL) { 139 printf("Out of memory.\n"); 137 140 rc = ENOMEM; 138 141 goto error; 139 142 } 143 144 dspec = str_dup(display_spec); 145 if (dspec == NULL) { 146 printf("Out of memory.\n"); 147 rc = ENOMEM; 148 goto error; 149 } 150 151 /* Remove additional arguments */ 152 qmark = str_chr(dspec, '?'); 153 if (qmark != NULL) 154 *qmark = '\0'; 140 155 141 156 rc = ui_create(display_spec, &taskbar->ui); … … 198 213 } 199 214 200 rc = tbsmenu_create(taskbar->window, taskbar->fixed, &taskbar->tbsmenu); 215 rc = tbsmenu_create(taskbar->window, taskbar->fixed, dspec, 216 &taskbar->tbsmenu); 201 217 if (rc != EOK) { 202 218 printf("Error creating start menu.\n"); … … 293 309 } 294 310 311 free(dspec); 295 312 *rtaskbar = taskbar; 296 313 return EOK; 297 314 error: 315 if (dspec != NULL) 316 free(dspec); 298 317 if (taskbar->lst != NULL) 299 318 tbarcfg_listener_destroy(taskbar->lst); … … 308 327 if (taskbar->ui != NULL) 309 328 ui_destroy(taskbar->ui); 329 free(taskbar); 310 330 return rc; 311 331
Note:
See TracChangeset
for help on using the changeset viewer.