From: VMware, Inc <> Date: Tue, 28 Jun 2011 19:51:56 +0000 (-0700) Subject: Remove the X{Grab,Ungrab}Server calls in resolutionSet X-Git-Tag: 2011.06.27-437995~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2902e6d8bebc45614cb7f832557dd2a313545b24;p=thirdparty%2Fopen-vm-tools.git Remove the X{Grab,Ungrab}Server calls in resolutionSet When using vesa X was getting into a sort of race condition because we were not calling XSync after the X{Grab,Ungrab}Server calls. This was causing X to appear to hang. Really since we aren't setting anything (only reading values) I don't see a reason to keep these calls. Hence remove them and fix the bug. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/services/plugins/resolutionSet/resolutionX11.c b/open-vm-tools/services/plugins/resolutionSet/resolutionX11.c index 50a1a2763..d4687111a 100644 --- a/open-vm-tools/services/plugins/resolutionSet/resolutionX11.c +++ b/open-vm-tools/services/plugins/resolutionSet/resolutionX11.c @@ -315,8 +315,6 @@ ResolutionCanSet(void) unsigned int num; int i; - XGrabServer(resInfoX->display); - xrrRes = XRRGetScreenResources(resInfoX->display, resInfoX->rootWindow); if (xrrRes) { @@ -345,8 +343,6 @@ ResolutionCanSet(void) XRRFreeScreenResources(xrrRes); } - XUngrabServer(resInfoX->display); - if (resInfoX->canUseRandR12) { return TRUE; }