apps/examples/nxterm: NxWM passed the size of the NxTK sub-window but nxterm example passed the size of the complete NxTK window. They must be made consistent.
This commit is contained in:
parent
66af5b46dd
commit
e063e93f77
@ -375,6 +375,12 @@ int nxterm_main(int argc, char **argv)
|
|||||||
nxcreate.type = BOARDIOC_XTERM_FRAMED;
|
nxcreate.type = BOARDIOC_XTERM_FRAMED;
|
||||||
nxcreate.minor = CONFIG_EXAMPLES_NXTERM_MINOR;
|
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);
|
ret = boardctl(BOARDIOC_NXTERM, (uintptr_t)&nxcreate);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
@ -56,14 +56,6 @@
|
|||||||
|
|
||||||
#include "nxterm_internal.h"
|
#include "nxterm_internal.h"
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Types
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -84,10 +76,6 @@ static void nxwndo_kbdin(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch,
|
|||||||
FAR void *arg);
|
FAR void *arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public 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.w = size->w;
|
||||||
g_nxterm_vars.wndo.wsize.h = size->h;
|
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.xres = bounds->pt2.x + 1;
|
||||||
g_nxterm_vars.yres = bounds->pt2.y + 1;
|
g_nxterm_vars.yres = bounds->pt2.y + 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user