From: VMware, Inc <> Date: Mon, 22 Mar 2010 19:09:52 +0000 (-0700) Subject: Unity/X11: Disable Unity when running under vmwgfx. X-Git-Tag: 2010.03.20-243334~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41751bd5e8486ebadd0a4d898c41e712d7b94304;p=thirdparty%2Fopen-vm-tools.git Unity/X11: Disable Unity when running under vmwgfx. From bug 527219: "Unity/X11 and the new (and experimental) vmwgfx driver don't yet play nicely together. We don't expect this to be ironed out anytime soon, so for Cobalt & Cheerios we'll instead disable Unity/X11 unless vmware-user knows it's running with the legacy vmware_drv.so X11 video driver." Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/unity/unityPlatformX11.c b/open-vm-tools/lib/unity/unityPlatformX11.c index 9c5cf012b..3dd4f59fa 100644 --- a/open-vm-tools/lib/unity/unityPlatformX11.c +++ b/open-vm-tools/lib/unity/unityPlatformX11.c @@ -116,6 +116,27 @@ static int unityX11ErrorCount = 0; Bool UnityPlatformIsSupported(void) { + Display *dpy; + int major; + int event_base; + int error_base; + + dpy = GDK_DISPLAY(); + /* + * Unity/X11 doesn't yet work with the new vmwgfx driver. Until that is + * fixed, we have to disable the feature. + * + * As for detecting which driver is in use, the legacy driver provides the + * VMWARE_CTRL extension for resolution and topology operations, while the + * new driver is instead controlled via XRandR. If we don't find said + * extension, then we'll assume the new driver is in use and disable Unity. + */ + if (XQueryExtension(dpy, "VMWARE_CTRL", &major, &event_base, &error_base) == + False) { + Debug("Unity is not yet supported under the vmwgfx driver.\n"); + return FALSE; + } + return TRUE; }