diff --git a/examples/common/entry/entry_x11.cpp b/examples/common/entry/entry_x11.cpp index d51c17c0a..16d6b124d 100644 --- a/examples/common/entry/entry_x11.cpp +++ b/examples/common/entry/entry_x11.cpp @@ -354,8 +354,9 @@ namespace entry m_root = RootWindow(m_display, screen); bx::memSet(&m_windowAttrs, 0, sizeof(m_windowAttrs) ); - m_windowAttrs.background_pixmap = 0; + m_windowAttrs.background_pixel = 0; m_windowAttrs.border_pixel = 0; + m_windowAttrs.bit_gravity = StaticGravity; m_windowAttrs.event_mask = 0 | ButtonPressMask | ButtonReleaseMask @@ -374,15 +375,10 @@ namespace entry , m_depth , InputOutput , m_visual - , CWBorderPixel|CWEventMask + , CWBorderPixel|CWEventMask|CWBackPixel|CWBitGravity , &m_windowAttrs ); - // Clear window to black. - XSetWindowAttributes attr; - bx::memSet(&attr, 0, sizeof(attr) ); - XChangeWindowAttributes(m_display, m_window[0], CWBackPixel, &attr); - const char* wmDeleteWindowName = "WM_DELETE_WINDOW"; Atom wmDeleteWindow; XInternAtoms(m_display, (char **)&wmDeleteWindowName, 1, False, &wmDeleteWindow); @@ -599,16 +595,11 @@ namespace entry , m_depth , InputOutput , m_visual - , CWBorderPixel|CWEventMask + , CWBorderPixel|CWEventMask|CWBackPixel|CWBitGravity , &m_windowAttrs ); m_window[_handle.idx] = window; - // Clear window to black. - XSetWindowAttributes attr; - bx::memSet(&attr, 0, sizeof(attr) ); - XChangeWindowAttributes(m_display, window, CWBackPixel, &attr); - const char* wmDeleteWindowName = "WM_DELETE_WINDOW"; Atom wmDeleteWindow; XInternAtoms(m_display, (char **)&wmDeleteWindowName, 1, False, &wmDeleteWindow);