Changeset d6c4d40 in mainline
- Timestamp:
- 2021-03-05T11:23:31Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f73a8e3
- Parents:
- 87822ce
- git-author:
- Jiri Svoboda <jiri@…> (2021-03-04 20:22:52)
- git-committer:
- Jiri Svoboda <jiri@…> (2021-03-05 11:23:31)
- Location:
- uspace/lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/console.c
r87822ce rd6c4d40 323 323 void console_unmap(console_ctrl_t *ctrl, charfield_t *buf) 324 324 { 325 async_exch_t *exch = async_exchange_begin(ctrl->output_sess); 326 (void) async_req_0_0(exch, CONSOLE_UNMAP); 327 async_exchange_end(exch); 328 325 329 as_area_destroy(buf); 326 330 } -
uspace/lib/congfx/src/console.c
r87822ce rd6c4d40 137 137 sysarg_t rows; 138 138 sysarg_t cols; 139 charfield_t *buf ;139 charfield_t *buf = NULL; 140 140 errno_t rc; 141 141 … … 149 149 if (rc != EOK) 150 150 goto error; 151 152 console_clear(con); 151 153 152 154 rc = console_map(con, cols, rows, &buf); … … 170 172 return EOK; 171 173 error: 174 if (buf != NULL) 175 console_unmap(cgc->con, buf); 172 176 if (cgc != NULL) 173 177 free(cgc); … … 187 191 if (rc != EOK) 188 192 return rc; 193 194 console_clear(cgc->con); 195 console_unmap(cgc->con, cgc->buf); 189 196 190 197 free(cgc); -
uspace/lib/ui/private/window.h
r87822ce rd6c4d40 39 39 40 40 #include <errno.h> 41 #include <congfx/console.h> 41 42 #include <display.h> 42 43 #include <gfx/context.h> … … 60 61 /** Display window */ 61 62 display_window_t *dwindow; 63 /** Console GC */ 64 console_gc_t *cgc; 62 65 /** Window GC */ 63 66 gfx_context_t *gc; -
uspace/lib/ui/src/window.c
r87822ce rd6c4d40 132 132 gfx_bitmap_t *bmp = NULL; 133 133 mem_gc_t *memgc = NULL; 134 console_gc_t *cgc ;134 console_gc_t *cgc = NULL; 135 135 errno_t rc; 136 136 … … 256 256 window->gc = gc; 257 257 #endif 258 window->cgc = cgc; 259 258 260 rc = ui_resource_create(window->gc, ui_is_textmode(ui), &res); 259 261 if (rc != EOK) … … 290 292 if (dgc != NULL) 291 293 dummygc_destroy(dgc); 294 if (cgc != NULL) 295 console_gc_delete(cgc); 292 296 if (dwindow != NULL) 293 297 display_window_destroy(dwindow); … … 321 325 if (window->dwindow != NULL) 322 326 display_window_destroy(window->dwindow); 327 if (window->cgc != NULL) 328 console_gc_delete(window->cgc); 323 329 free(window); 324 330 }
Note:
See TracChangeset
for help on using the changeset viewer.