Changeset 1766326 in mainline for uspace/app/taskbar/taskbar.c


Ignore:
Timestamp:
2022-10-18T09:06:07Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7a05d924
Parents:
0761448
git-author:
Jiri Svoboda <jiri@…> (2022-10-17 17:05:56)
git-committer:
Jiri Svoboda <jiri@…> (2022-10-18 09:06:07)
Message:

Window management plumbing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/taskbar/taskbar.c

    r0761448 r1766326  
    4242#include <ui/ui.h>
    4343#include <ui/window.h>
     44#include <wndmgt.h>
    4445#include "clock.h"
    4546#include "taskbar.h"
     
    6768 *
    6869 * @param display_spec Display specification
     70 * @param wndmgt_svc Window management service (or WNDMGT_DEFAULT)
    6971 * @param rtaskbar Place to store pointer to new task bar
    7072 * @return @c EOK on success or an error coe
    7173 */
    72 errno_t taskbar_create(const char *display_spec, taskbar_t **rtaskbar)
     74errno_t taskbar_create(const char *display_spec, const char *wndmgt_svc,
     75    taskbar_t **rtaskbar)
    7376{
    7477        ui_wnd_params_t params;
     
    8386                rc = ENOMEM;
    8487                goto error;
     88        }
     89
     90        if (wndmgt_svc != NULL) {
     91                rc = wndmgt_open(wndmgt_svc, NULL, NULL, &taskbar->wndmgt);
     92                if (rc != EOK)
     93                        goto error;
    8594        }
    8695
     
    215224        if (taskbar->ui != NULL)
    216225                ui_destroy(taskbar->ui);
     226        if (taskbar->wndmgt != NULL)
     227                wndmgt_close(taskbar->wndmgt);
    217228        return rc;
    218229
     
    226237        ui_window_destroy(taskbar->window);
    227238        ui_destroy(taskbar->ui);
     239        if (taskbar->wndmgt != NULL)
     240                wndmgt_close(taskbar->wndmgt);
    228241}
    229242
Note: See TracChangeset for help on using the changeset viewer.