This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit ee3e93181255f7dd9a47e99eae9cd8f6ec47a041
Author: xingrentai.1 <[email protected]>
AuthorDate: Thu Feb 26 17:32:55 2026 +0800

    arch/sim: fix X11 framebuffer window not visible in POSIX simulator
    
    The X11 framebuffer implementation in the POSIX simulator was creating a 
window
    and graphics context but failing to map (display) the window to thescreen 
with XMapWindow().
    
    This omission meant the framebuffer window would be created in the 
X11server but remain hidden,
    making it impossible to see any graphics outputfrom the simulator. The 
window existed in the X11
    server's state but wasnot rendered to the screen.
    
    This fix adds the missing XMapWindow(display, g_window) call aftercreating 
the graphics context, which:
    1. Maps the created X11 window to the screen (makes it visible).
    2. Ensures framebuffer output is rendered to the display as expected.
    3. Maintains compatibility with existing X11 framebuffer logic.
    
    The change restores basic visibility of the simulator's framebuffer window,
    fixing a critical usability issue for graphics-related testing in the POSIX 
simulator.
    
    Signed-off-by: chao an <[email protected]>
---
 arch/sim/src/sim/posix/sim_x11framebuffer.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/sim/src/sim/posix/sim_x11framebuffer.c 
b/arch/sim/src/sim/posix/sim_x11framebuffer.c
index 97683486a48..68173ff5ee4 100644
--- a/arch/sim/src/sim/posix/sim_x11framebuffer.c
+++ b/arch/sim/src/sim/posix/sim_x11framebuffer.c
@@ -166,6 +166,11 @@ static inline Display *sim_x11createframe(void)
   gcval.graphics_exposures = 0;
   g_gc = XCreateGC(display, g_window, GCGraphicsExposures, &gcval);
 
+  /* Map the window to make it visible on the display after it has been
+   * created and configured
+   */
+
+  XMapWindow(display, g_window);
   return display;
 }
 

Reply via email to