diff --git a/examples/22-windows/windows.cpp b/examples/22-windows/windows.cpp index dbf594409..f1aefc6c9 100644 --- a/examples/22-windows/windows.cpp +++ b/examples/22-windows/windows.cpp @@ -163,7 +163,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) uint8_t viewId = (uint8_t)state.m_handle.idx; entry::WindowState& win = windows[viewId]; - if (win.m_nwh != state.m_nwh + if (win.m_nwh != state.m_nwh || (win.m_width != state.m_width || win.m_height != state.m_height) ) { diff --git a/examples/common/entry/entry_x11.cpp b/examples/common/entry/entry_x11.cpp index 7d5a195c5..fe0e9e8b5 100644 --- a/examples/common/entry/entry_x11.cpp +++ b/examples/common/entry/entry_x11.cpp @@ -184,6 +184,7 @@ namespace entry thread.init(mte.threadFunc, &mte); WindowHandle defaultWindow = { 0 }; + m_eventQueue.postSizeEvent(defaultWindow, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT); while (!m_exit) { @@ -277,6 +278,7 @@ namespace entry { const XResizeRequestEvent& xresize = event.xresizerequest; XResizeWindow(m_display, m_window, xresize.width, xresize.height); + m_eventQueue.postSizeEvent(defaultWindow, xresize.width, xresize.height); } break; } diff --git a/scripts/genie.lua b/scripts/genie.lua index ddd658985..07cd1d0c8 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -210,6 +210,7 @@ exampleProject("18-ibl") exampleProject("19-oit") exampleProject("20-nanovg") exampleProject("21-deferred") +exampleProject("22-windows") if _OPTIONS["with-shared-lib"] then bgfxProject("-shared-lib", "SharedLib", {})