Commit 3ef49054 authored by cutealien's avatar cutealien

Fix a problem in IrrlichtDevice::setResizable that caused window titlebars to...

Fix a problem in IrrlichtDevice::setResizable that caused window titlebars to hide occasionally under the taskbar in some systems (Ubuntu, Mint).
This was caused by quick calls to XUnmapWindow followed by XMapWindow which some WM's can't handle. 
Adding a long sleep call (~200ms) in between would have been a workaround, but looked ugly as the window is hidden in the meantime.
I found no reference in X11 documentation that unmapping is necessary for this, so I removed those calls now.
Changing the resize flags still works in my tests on Debian and Ubuntu. If it causes problems we have to switch to the ugly hack 
or get certain systems to repair their window managers.



git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5091 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ce863d10
-------------------------- --------------------------
Changes in 1.9 (not yet released) Changes in 1.9 (not yet released)
- Fix problem in IrrlichtDevice::setResizable on X11 that caused window titlebars to hide occasionally under the taskbar in some systems (Ubuntu, Mint).
- Added new IRenderTarget interface. - Added new IRenderTarget interface.
- Replace the swprintf and snprintf defines by swprintf_irr and snprintf_irr to avoid conflicts with the standard libraries (and other libraries). - Replace the swprintf and snprintf defines by swprintf_irr and snprintf_irr to avoid conflicts with the standard libraries (and other libraries).
- XBox support removed as it would need DX8 (this was about the original XBox). - XBox support removed as it would need DX8 (this was about the original XBox).
......
...@@ -1475,7 +1475,6 @@ void CIrrDeviceLinux::setResizable(bool resize) ...@@ -1475,7 +1475,6 @@ void CIrrDeviceLinux::setResizable(bool resize)
if (CreationParams.DriverType == video::EDT_NULL || CreationParams.Fullscreen ) if (CreationParams.DriverType == video::EDT_NULL || CreationParams.Fullscreen )
return; return;
XUnmapWindow(XDisplay, XWindow);
if ( !resize ) if ( !resize )
{ {
// Must be heap memory because data size depends on X Server // Must be heap memory because data size depends on X Server
...@@ -1490,7 +1489,6 @@ void CIrrDeviceLinux::setResizable(bool resize) ...@@ -1490,7 +1489,6 @@ void CIrrDeviceLinux::setResizable(bool resize)
{ {
XSetWMNormalHints(XDisplay, XWindow, StdHints); XSetWMNormalHints(XDisplay, XWindow, StdHints);
} }
XMapWindow(XDisplay, XWindow);
XFlush(XDisplay); XFlush(XDisplay);
#endif // #ifdef _IRR_COMPILE_WITH_X11_ #endif // #ifdef _IRR_COMPILE_WITH_X11_
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment