From cc0b7efeadd7222705ceda08924efaa075b1832e Mon Sep 17 00:00:00 2001 From: Lionel Ulmer Date: Tue, 15 Jul 2003 20:44:24 +0000 Subject: [PATCH] Desktop mode should only disable mode switching, not gamma ramp support. --- dlls/x11drv/xvidmode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/x11drv/xvidmode.c b/dlls/x11drv/xvidmode.c index 956bc85fe3c..35988ffcf0a 100644 --- a/dlls/x11drv/xvidmode.c +++ b/dlls/x11drv/xvidmode.c @@ -108,12 +108,10 @@ void X11DRV_XF86VM_Init(void) { int nmodes, i; Bool ok; + Bool in_desktop_mode = (root_window != DefaultRootWindow(gdi_display)); if (xf86vm_major) return; /* already initialized? */ - /* if in desktop mode, don't use XVidMode */ - if (root_window != DefaultRootWindow(gdi_display)) return; - if (!usexvidmode) return; /* see if XVidMode is available */ @@ -138,11 +136,14 @@ void X11DRV_XF86VM_Init(void) #endif /* retrieve modes */ - ok = XF86VidModeGetAllModeLines(gdi_display, DefaultScreen(gdi_display), &nmodes, &modes); + if (!in_desktop_mode) ok = XF86VidModeGetAllModeLines(gdi_display, DefaultScreen(gdi_display), &nmodes, &modes); } wine_tsx11_unlock(); if (!ok) return; + /* In desktop mode, do not switch resolution... But still use the Gamma ramp stuff */ + if (in_desktop_mode) return; + TRACE("XVidMode modes: count=%d\n", nmodes); xf86vm_mode_count = nmodes;