Changed: #1044 Window content is black after switching windowed <-> fullscreen
This commit is contained in:
parent
bcf2e45212
commit
d06e9c1b9a
1 changed files with 24 additions and 24 deletions
|
@ -1604,8 +1604,7 @@ bool CDriverGL::getModes(std::vector<GfxMode> &modes)
|
||||||
|
|
||||||
if (nsizes > 0)
|
if (nsizes > 0)
|
||||||
{
|
{
|
||||||
nldebug("3D: %d available XRandR modes:", nsizes);
|
// nldebug("3D: %d available XRandR modes:", nsizes);
|
||||||
|
|
||||||
for (sint i = 0; i < nsizes; ++i)
|
for (sint i = 0; i < nsizes; ++i)
|
||||||
{
|
{
|
||||||
// Add this mode
|
// Add this mode
|
||||||
|
@ -1614,8 +1613,7 @@ bool CDriverGL::getModes(std::vector<GfxMode> &modes)
|
||||||
mode.Height = sizes[i].height;
|
mode.Height = sizes[i].height;
|
||||||
mode.Frequency = 0;
|
mode.Frequency = 0;
|
||||||
modes.push_back(mode);
|
modes.push_back(mode);
|
||||||
|
// nldebug("3D: Mode %d: %dx%d", i, mode.Width, mode.Height);
|
||||||
nldebug("3D: Mode %d: %dx%d", i, mode.Width, mode.Height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
found = true;
|
found = true;
|
||||||
|
@ -1635,22 +1633,29 @@ bool CDriverGL::getModes(std::vector<GfxMode> &modes)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XF86VIDMODE
|
#ifdef XF86VIDMODE
|
||||||
int nmodes;
|
if (!found && _xvidmode_version > 0)
|
||||||
XF86VidModeModeInfo **ms;
|
|
||||||
if (!found && XF86VidModeGetAllModeLines(_dpy, screen, &nmodes, &ms))
|
|
||||||
{
|
{
|
||||||
nlinfo("3D: %d available XF86VidMode modes:", nmodes);
|
int nmodes;
|
||||||
for (int j = 0; j < nmodes; j++)
|
XF86VidModeModeInfo **ms;
|
||||||
|
if (XF86VidModeGetAllModeLines(_dpy, screen, &nmodes, &ms))
|
||||||
{
|
{
|
||||||
// Add this mode
|
// nlinfo("3D: %d available XF86VidMode modes:", nmodes);
|
||||||
GfxMode mode;
|
for (int j = 0; j < nmodes; j++)
|
||||||
mode.Width = (uint16)ms[j]->hdisplay;
|
{
|
||||||
mode.Height = (uint16)ms[j]->vdisplay;
|
// Add this mode
|
||||||
mode.Frequency = modeInfoToFrequency(ms[j]);
|
GfxMode mode;
|
||||||
nlinfo("3D: Mode %d: %dx%d, %d Hz", j, mode.Width, mode.Height, mode.Frequency);
|
mode.Width = (uint16)ms[j]->hdisplay;
|
||||||
modes.push_back (mode);
|
mode.Height = (uint16)ms[j]->vdisplay;
|
||||||
|
mode.Frequency = modeInfoToFrequency(ms[j]);
|
||||||
|
// nlinfo("3D: Mode %d: %dx%d, %d Hz", j, mode.Width, mode.Height, mode.Frequency);
|
||||||
|
modes.push_back (mode);
|
||||||
|
}
|
||||||
|
XFree(ms);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nlwarning("3D: XF86VidModeGetAllModeLines failed");
|
||||||
}
|
}
|
||||||
XFree(ms);
|
|
||||||
}
|
}
|
||||||
#endif // XF86VIDMODE
|
#endif // XF86VIDMODE
|
||||||
|
|
||||||
|
@ -1662,9 +1667,6 @@ bool CDriverGL::getModes(std::vector<GfxMode> &modes)
|
||||||
mode.Height = DisplayHeight(_dpy, screen);
|
mode.Height = DisplayHeight(_dpy, screen);
|
||||||
mode.Frequency = 0;
|
mode.Frequency = 0;
|
||||||
modes.push_back(mode);
|
modes.push_back(mode);
|
||||||
|
|
||||||
nldebug("3D: X11 available mode:");
|
|
||||||
nldebug("3D: %dx%d", mode.Width, mode.Height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -2144,11 +2146,9 @@ void CDriverGL::setWindowSize(uint32 width, uint32 height)
|
||||||
_WindowHeight = height;
|
_WindowHeight = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update WM hints (update size and allow resizing)
|
// Update WM hints (allow resizing)
|
||||||
XSizeHints size_hints;
|
XSizeHints size_hints;
|
||||||
// size_hints.width = width;
|
size_hints.flags = 0;
|
||||||
// size_hints.height = height;
|
|
||||||
// size_hints.flags = PSize;
|
|
||||||
|
|
||||||
if (!_Resizable || _FullScreen)
|
if (!_Resizable || _FullScreen)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue