diff --git a/examples/nxterm/nxterm_main.c b/examples/nxterm/nxterm_main.c index 5d1afce69..1a56f6335 100644 --- a/examples/nxterm/nxterm_main.c +++ b/examples/nxterm/nxterm_main.c @@ -375,6 +375,12 @@ int nxterm_main(int argc, char **argv) nxcreate.type = BOARDIOC_XTERM_FRAMED; nxcreate.minor = CONFIG_EXAMPLES_NXTERM_MINOR; + /* BOARDIOC_NXTERM wants the size of the NxTK main sub-window */ + + nxcreate.wndo.wsize.w -= (2 * CONFIG_NXTK_BORDERWIDTH); + nxcreate.wndo.wsize.h -= (CONFIG_EXAMPLES_NXTERM_TOOLBAR_HEIGHT + + 2 * CONFIG_NXTK_BORDERWIDTH); + ret = boardctl(BOARDIOC_NXTERM, (uintptr_t)&nxcreate); if (ret < 0) { diff --git a/examples/nxterm/nxterm_wndo.c b/examples/nxterm/nxterm_wndo.c index 289ac4b50..9d0acfcd9 100644 --- a/examples/nxterm/nxterm_wndo.c +++ b/examples/nxterm/nxterm_wndo.c @@ -56,14 +56,6 @@ #include "nxterm_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -84,10 +76,6 @@ static void nxwndo_kbdin(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg); #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Public Data ****************************************************************************/ @@ -174,7 +162,9 @@ static void nxwndo_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, g_nxterm_vars.wndo.wsize.w = size->w; g_nxterm_vars.wndo.wsize.h = size->h; - /* Save the window limits (these should be the same for all places and all windows */ + /* Save the window limits (these should be the same for all places and + * all windows) + */ g_nxterm_vars.xres = bounds->pt2.x + 1; g_nxterm_vars.yres = bounds->pt2.y + 1;