mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
graphics/: Correct logic for copy of bit maps with resolution less than 8 bits from the per-window framebuffer to the device.
This commit is contained in:
@@ -109,7 +109,7 @@ NXTKWINDOW nxtk_openwindow(NXHANDLE handle, uint8_t flags,
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
if (handle == NULL || cb == NULL)
|
||||
if (handle == NULL || cb == NULL || (flags & ~NXTK_WINDOW_USER) != 0)
|
||||
{
|
||||
set_errno(EINVAL);
|
||||
return NULL;
|
||||
@@ -134,8 +134,8 @@ NXTKWINDOW nxtk_openwindow(NXHANDLE handle, uint8_t flags,
|
||||
|
||||
/* Then let nx_constructwindow do the rest */
|
||||
|
||||
ret = nx_constructwindow(handle, (NXWINDOW)&fwnd->wnd, flags, &g_nxtkcb,
|
||||
NULL);
|
||||
ret = nx_constructwindow(handle, (NXWINDOW)&fwnd->wnd,
|
||||
flags | NXBE_WINDOW_FRAMED, &g_nxtkcb, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
/* An error occurred, the window has been freed */
|
||||
|
||||
@@ -99,9 +99,6 @@ int nxtk_setsize(NXTKWINDOW hfwnd, FAR const struct nxgl_size_s *size)
|
||||
* callbacks. Normally the frame is updated with every redraw callback.
|
||||
* However, as a minimum, the frame only has to but updated after the
|
||||
* window or toolbar sizes change.
|
||||
*
|
||||
* REVISIT: Since this works for RAM backed windows, it should work for
|
||||
* all windows. Why not simplify?
|
||||
*/
|
||||
|
||||
if (ret >= 0 && NXBE_ISRAMBACKED(&fwnd->wnd))
|
||||
|
||||
Reference in New Issue
Block a user