hi i'm trying to make my irrlicht window not resizable un der linux but this doesn't work !!
it works well under windows but i can still resize the window under linux ??
anyone got a solution ?
setResizeAble(false) doesn't work under linux !!
setResizeAble(false) doesn't work under linux !!
[ Enzys http://enzys.online.fr ] : Un MMORPG français en dev (^_^)Y
Old message, but i got at least a partial solution (resizing can be disabled now) for it in case someone else needs it:
Btw. i think the function should be called setResizable :-)
edit: Only allowed when not Fullscreen, otherwise keyboard focus gets lost.
Code: Select all
//! Sets if the window should be resizeable in windowed mode.
void CIrrDeviceLinux::setResizeAble(bool resize)
{
if ( Fullscreen )
return;
#ifdef _IRR_COMPILE_WITH_X11_
if ( !resize )
{
XUnmapWindow(display, window);
XSizeHints Hints;
Hints.flags=PSize|PMinSize|PMaxSize;
Hints.min_width=Hints.max_width=Hints.base_width=Width;
Hints.min_height=Hints.max_height=Hints.base_height=Height;
XSetWMNormalHints(display,window,&Hints);
XMapWindow(display, window);
XFlush(display);
}
else
{
// TODO: this is default and set anyway.
// I don't know how to get that state back in the correct way.
// Maybe min_sizes to a small values and max_sizes to screensizes.
// Maybe the old values can also be received some way (XGetWMNormalHints maybe).
}
#endif // #ifdef _IRR_COMPILE_WITH_X11_
}
edit: Only allowed when not Fullscreen, otherwise keyboard focus gets lost.