-//void X11WindowSystem::setDisplayMode(){
-// XF86VidModeModeInfo **modes;
-// int modeNum;
-// int bestMode = -1;
-// LOG_DEBUG("X11WindowSystem", "trying for fullscreen mode " << resolutionWidth << " " << resolutionHeight);
-// XF86VidModeGetAllModeLines(x11Display, 0, &modeNum, &modes);
-// LOG_DEBUG("X11WindowSystem", "found " << modeNum << " modes");
-// /* look for mode with requested resolution */
-// for (int i = 0; i < modeNum; i++)
-// if ((modes[i]->hdisplay == resolutionWidth) && (modes[i]->vdisplay == resolutionHeight))
-// bestMode = i;
-// if (bestMode==-1){
-// int bestHeight = 0;
-// for (int i = 0; i < modeNum; i++)
-// if (modes[i]->hdisplay == resolutionWidth && modes[i]->vdisplay >= bestHeight){
-// bestMode = i;
-// bestHeight = modes[i]->vdisplay;
-// }
-// }
-// if (bestMode>=0){
-// LOG_DEBUG("X11WindowSystem", "changing mode to "<< modes[bestMode]->hdisplay << " " << modes[bestMode]->vdisplay );
-// XF86VidModeSwitchToMode(x11Display, 0, modes[bestMode]);
-// XF86VidModeSetViewPort(x11Display, 0, 0, 0);
-//
-// }else{
-// LOG_ERROR("X11WindowSystem", "could not find appropriate mode!");
-// // take last mode, its probably the highest resolution
-// resolutionWidth = modes[modeNum-1]->hdisplay;
-// resolutionHeight = modes[modeNum-1]->vdisplay;
-// windowWidth = resolutionWidth;
-// if (windowHeight>resolutionHeight)
-// windowHeight = resolutionHeight;
-// XF86VidModeSwitchToMode(x11Display, 0, modes[modeNum-1]);
-// XF86VidModeSetViewPort(x11Display, 0, 0, 0);
-// }
-// LOG_DEBUG("X11WindowSystem", "Set the mode");
-// LOG_DEBUG("X11WindowSystem", "mode: " << resolutionWidth << "x" << resolutionHeight);
-// LOG_DEBUG("X11WindowSystem", "renderwindow: " << windowWidth << "x" << windowHeight);
-//}
-