Changeset c11ee605 in mainline for uspace/srv/hid/display/dsops.c
- Timestamp:
- 2020-05-11T15:36:46Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 83cb672
- Parents:
- e49b7997
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/dsops.c
re49b7997 rc11ee605 76 76 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_create()"); 77 77 78 ds_display_lock(client->display); 79 78 80 rc = ds_window_create(client, params, &wnd); 79 81 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_create() - ds_window_create -> %d", rc); 80 if (rc != EOK) 82 if (rc != EOK) { 83 ds_display_unlock(client->display); 81 84 return rc; 85 } 82 86 83 87 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_create() -> EOK, id=%zu", … … 92 96 (void) ds_display_paint(wnd->display, NULL); 93 97 98 ds_display_unlock(client->display); 99 94 100 *rwnd_id = wnd->id; 95 101 return EOK; … … 101 107 ds_window_t *wnd; 102 108 103 wnd = ds_client_find_window(client, wnd_id); 104 if (wnd == NULL) 105 return ENOENT; 109 ds_display_lock(client->display); 110 111 wnd = ds_client_find_window(client, wnd_id); 112 if (wnd == NULL) { 113 ds_display_unlock(client->display); 114 return ENOENT; 115 } 106 116 107 117 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_destroy()"); 108 118 ds_client_remove_window(wnd); 109 119 ds_window_destroy(wnd); 120 ds_display_unlock(client->display); 110 121 return EOK; 111 122 } … … 117 128 ds_window_t *wnd; 118 129 119 wnd = ds_client_find_window(client, wnd_id); 120 if (wnd == NULL) 121 return ENOENT; 130 ds_display_lock(client->display); 131 132 wnd = ds_client_find_window(client, wnd_id); 133 if (wnd == NULL) { 134 ds_display_unlock(client->display); 135 return ENOENT; 136 } 122 137 123 138 log_msg(LVL_NOTE, LVL_DEBUG, "disp_window_move_req()"); 124 139 ds_window_move_req(wnd, pos); 140 ds_display_unlock(client->display); 125 141 return EOK; 126 142 } … … 131 147 ds_window_t *wnd; 132 148 133 wnd = ds_client_find_window(client, wnd_id); 134 if (wnd == NULL) 135 return ENOENT; 149 ds_display_lock(client->display); 150 151 wnd = ds_client_find_window(client, wnd_id); 152 if (wnd == NULL) { 153 ds_display_unlock(client->display); 154 return ENOENT; 155 } 136 156 137 157 log_msg(LVL_NOTE, LVL_DEBUG, "disp_window_move()"); 138 158 ds_window_move(wnd, pos); 159 ds_display_unlock(client->display); 139 160 return EOK; 140 161 } … … 146 167 ds_window_t *wnd; 147 168 148 wnd = ds_client_find_window(client, wnd_id); 149 if (wnd == NULL) 150 return ENOENT; 169 ds_display_lock(client->display); 170 171 wnd = ds_client_find_window(client, wnd_id); 172 if (wnd == NULL) { 173 ds_display_unlock(client->display); 174 return ENOENT; 175 } 151 176 152 177 log_msg(LVL_NOTE, LVL_DEBUG, "disp_window_resize_req()"); 153 178 ds_window_resize_req(wnd, rsztype, pos); 179 ds_display_unlock(client->display); 154 180 return EOK; 155 181 } … … 160 186 ds_client_t *client = (ds_client_t *) arg; 161 187 ds_window_t *wnd; 162 163 wnd = ds_client_find_window(client, wnd_id); 164 if (wnd == NULL) 165 return ENOENT; 188 errno_t rc; 189 190 ds_display_lock(client->display); 191 192 wnd = ds_client_find_window(client, wnd_id); 193 if (wnd == NULL) { 194 ds_display_unlock(client->display); 195 return ENOENT; 196 } 166 197 167 198 log_msg(LOG_DEFAULT, LVL_NOTE, "disp_window_resize()"); 168 return ds_window_resize(wnd, offs, nbound); 199 rc = ds_window_resize(wnd, offs, nbound); 200 ds_display_unlock(client->display); 201 return rc; 169 202 } 170 203 … … 178 211 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_get_event()"); 179 212 213 ds_display_lock(client->display); 214 180 215 rc = ds_client_get_event(client, &wnd, event); 181 if (rc != EOK) 216 if (rc != EOK) { 217 ds_display_unlock(client->display); 182 218 return rc; 219 } 183 220 184 221 *wnd_id = wnd->id; 222 ds_display_unlock(client->display); 185 223 return EOK; 186 224 } … … 192 230 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_get_info()"); 193 231 232 ds_display_lock(client->display); 194 233 ds_display_get_info(client->display, info); 234 ds_display_unlock(client->display); 195 235 return EOK; 196 236 }
Note:
See TracChangeset
for help on using the changeset viewer.