Changed: Remove hack for black window bug (related to previous NVidia driver)

This commit is contained in:
kervala 2010-11-21 22:15:34 +01:00
parent ba8b7eee8b
commit e3df75f484

View file

@ -1131,10 +1131,6 @@ bool CDriverGL::saveScreenMode()
#elif defined(NL_OS_UNIX) #elif defined(NL_OS_UNIX)
// hide window (hack to avoid black window bug)
if (_win)
XUnmapWindow(_dpy, _win);
int screen = DefaultScreen(_dpy); int screen = DefaultScreen(_dpy);
res = false; res = false;
@ -1196,10 +1192,6 @@ bool CDriverGL::restoreScreenMode()
#elif defined(NL_OS_UNIX) #elif defined(NL_OS_UNIX)
// hide window (hack to avoid black window bug)
if (_win)
XUnmapWindow(_dpy, _win);
int screen = DefaultScreen(_dpy); int screen = DefaultScreen(_dpy);
#ifdef HAVE_XRANDR #ifdef HAVE_XRANDR
@ -1775,10 +1767,6 @@ bool CDriverGL::setWindowStyle(EWindowStyle windowStyle)
} }
} }
// show window (hack to avoid black window bug)
if (_WindowVisible)
XMapRaised(_dpy, _win);
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS
_CurrentMode.Windowed = (windowStyle == EWSWindowed); _CurrentMode.Windowed = (windowStyle == EWSWindowed);
@ -1794,9 +1782,6 @@ bool CDriverGL::setMode(const GfxMode& mode)
if (!setScreenMode(mode)) if (!setScreenMode(mode))
return false; return false;
// change window size before changing style for some cases
setWindowSize(mode.Width, mode.Height);
// when changing window style, it's possible system change window size too // when changing window style, it's possible system change window size too
setWindowStyle(mode.Windowed ? EWSWindowed : EWSFullscreen); setWindowStyle(mode.Windowed ? EWSWindowed : EWSFullscreen);