DocumentWindow doesn't always come up correct size

This is a long-term issue I've  been having on Linux.  My main window is derived from DocumentWindow using native toolbars.  In the constructor I set the bounds (or specific size, depending).  Most of the time, the window shows up correctly, but sometimes it shows up as a 128x128 window (instead of, say 800x600).  

This only occurs on Linux, so my presumption is that it may be a timing issue with X messages or something. But I've no clue where to look to debug this.

I"m running Mint 17 with the Cinnamon window manager (not that it *should* make a difference, but who knows)

Any help would be most appreciated.

Am I the only one with this issue?

Not something that I've ever seen..

This is something I have seen from time to time, maybe not with a 128x128 window, but I know I have some horrible workarounds in my code to prevent the main window (with native toolbar) from being 1x1 (randomly of course). I also recall having a lot of hard time to get the main window to show up reliably with a native titlebar at the correct size and without flickering (like when it temporarily appears at position (0,0) before it is moved at its final position).

These workaround are now quite old so I don't know if they are still required, but in my version , I have a timerCallback that checks if the main window has a suspicious size (like getWidth() < 100 & getHeight < 100) and then performs a resize of the content component. It is that ugly.

I can't figure it out.  The window always ends up as 128x128 (when there's a problem).  My only hope here is to do an initialization-only callback on the 'resize()' which checks the current size, and if it doesn't match the size it should be, then resize the window.  Dunno if that will work...

Well, it does.  So for LInux and Raspberry Pi, I'm trapping after a 'resize to this size' command, and checking on the resize() callback if the item has the right size.  This does seem to work, though it is really, really ugly.