Changeset 1b92d4b in mainline for uspace/app/taskbar/taskbar.c
- Timestamp:
- 2022-11-01T13:22:48Z (18 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fc00f0d
- Parents:
- 913add60
- git-author:
- Jiri Svoboda <jiri@…> (2022-10-31 18:22:34)
- git-committer:
- Jiri Svoboda <jiri@…> (2022-11-01 13:22:48)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/taskbar/taskbar.c
r913add60 r1b92d4b 53 53 }; 54 54 55 static void taskbar_wm_window_added(void *, sysarg_t);56 static void taskbar_wm_window_removed(void *, sysarg_t);57 58 static wndmgt_cb_t taskbar_wndmgt_cb = {59 .window_added = taskbar_wm_window_added,60 .window_removed = taskbar_wm_window_removed61 };62 63 55 /** Window close button was clicked. 64 56 * … … 96 88 } 97 89 98 if (wndmgt_svc != NULL) {99 rc = wndmgt_open(wndmgt_svc, &taskbar_wndmgt_cb,100 (void *)taskbar, &taskbar->wndmgt);101 if (rc != EOK)102 goto error;103 }104 105 90 rc = ui_create(display_spec, &taskbar->ui); 106 91 if (rc != EOK) { … … 177 162 } 178 163 179 rc = wndlist_create( ui_res, taskbar->fixed, &taskbar->wndlist);164 rc = wndlist_create(taskbar->window, taskbar->fixed, &taskbar->wndlist); 180 165 if (rc != EOK) { 181 166 printf("Error creating window list.\n"); … … 183 168 } 184 169 185 rc = wndlist_ attach_wm(taskbar->wndlist, taskbar->wndmgt);170 rc = wndlist_open_wm(taskbar->wndlist, wndmgt_svc); 186 171 if (rc != EOK) { 187 172 printf("Error attaching window management service.\n"); … … 233 218 if (taskbar->ui != NULL) 234 219 ui_destroy(taskbar->ui); 235 if (taskbar->wndmgt != NULL)236 wndmgt_close(taskbar->wndmgt);237 220 return rc; 238 221 … … 246 229 ui_window_destroy(taskbar->window); 247 230 ui_destroy(taskbar->ui); 248 if (taskbar->wndmgt != NULL)249 wndmgt_close(taskbar->wndmgt);250 231 } 251 232 252 /** Handle WM window added event.253 *254 * @param arg Argument (taskbar_t *)255 * @param wnd_id Window ID256 */257 static void taskbar_wm_window_added(void *arg, sysarg_t wnd_id)258 {259 taskbar_t *taskbar = (taskbar_t *)arg;260 261 printf("wm_window_added: taskbar=%p wnd_id=%zu\n",262 (void *)taskbar, wnd_id);263 }264 265 /** Handle WM window removed event.266 *267 * @param arg Argument (taskbar_t *)268 * @param wnd_id Window ID269 */270 static void taskbar_wm_window_removed(void *arg, sysarg_t wnd_id)271 {272 taskbar_t *taskbar = (taskbar_t *)arg;273 274 printf("wm_window_removed: taskbar=%p wnd_id=%zu\n",275 (void *)taskbar, wnd_id);276 }277 278 233 /** @} 279 234 */
Note:
See TracChangeset
for help on using the changeset viewer.