QVistaHelper::VistaState QVistaHelper::vistaState() { if (cachedVistaState == Dirty) cachedVistaState = isCompositionEnabled() ? VistaAero : isThemeActive() ? VistaBasic : Classic; return cachedVistaState; }
static void swapBuffers(_GLFWwindow* window) { // HACK: Use DwmFlush when desktop composition is enabled if (isCompositionEnabled() && !window->monitor) { int count = abs(window->context.wgl.interval); while (count--) _glfw_DwmFlush(); } SwapBuffers(window->context.wgl.dc); }
static void swapInterval(int interval) { _GLFWwindow* window = _glfwPlatformGetCurrentContext(); window->context.wgl.interval = interval; // HACK: Disable WGL swap interval when desktop composition is enabled to // avoid interfering with DWM vsync if (isCompositionEnabled() && !window->monitor) interval = 0; if (_glfw.wgl.EXT_swap_control) _glfw.wgl.SwapIntervalEXT(interval); }