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

hg/feature/sound
kervala 14 years ago
parent c8816a2a13
commit e8e3a31b97

@ -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);

Loading…
Cancel
Save