mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-04-02 10:30:07 -04:00
x11: Post size event when initializing window.
This commit is contained in:
parent
4a1eb54563
commit
22614cf946
3 changed files with 4 additions and 1 deletions
|
@ -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) )
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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", {})
|
||||
|
|
Loading…
Add table
Reference in a new issue