# HG changeset patch # User Thinker K.F. Li # Date 1291824257 -28800 # Node ID 1de8bb740c46c93b2eeca07c84f6e15395f4b522 # Parent 9163eefa0039176a60036d3539306a30d834f7e9 Add pre-created window for _cons_supp_new_with_win() diff -r 9163eefa0039 -r 1de8bb740c46 src/cons_supp.c --- a/src/cons_supp.c Wed Dec 08 23:41:15 2010 +0800 +++ b/src/cons_supp.c Thu Dec 09 00:04:17 2010 +0800 @@ -46,6 +46,7 @@ struct _cons_supp_runtime { MB_DISPLAY display; + MB_WINDOW win; mbe_surface_t *surface; mbe_t *cr; @@ -365,7 +366,7 @@ mbe_init(); cmb_rt->surface = - mbe_win_surface_create(cmb_rt->display, NULL, + mbe_win_surface_create(cmb_rt->display, cmb_rt->win, MB_IFMT_ARGB32, w, h); cmb_rt->cr = mbe_create(cmb_rt->surface); @@ -428,6 +429,7 @@ } cmb_rt->display = (MB_DISPLAY)console_fd; + cmb_rt->win = NULL; cmb_rt->w = w; cmb_rt->h = h; @@ -522,7 +524,7 @@ return (mb_rt_t *)rt; } -/*! \brief Create a new runtime for existed window for X. +/*! \brief Create a new runtime for existed window for console. * * The object returned by this function must be free with * _cons_supp_free_keep_win() to prevent the window from closed.