mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-20 13:53:14 +01:00
Fix X11 flicker when window is being resized (#2203)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user