From: VMware, Inc <> Date: Tue, 19 Oct 2010 18:52:30 +0000 (-0700) Subject: Internal branch sync. Included in this change: X-Git-Tag: 2010.10.18-313025~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e27d975c09d3b965a5e5c804bde30cb7cbd0fa2f;p=thirdparty%2Fopen-vm-tools.git Internal branch sync. Included in this change: . Change GHI_GetBinaryInfo to return a string and vector of icons. . Unity: Relocate and rename 'updateChannel'. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegration.cpp b/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegration.cpp index 64cf4c839..f43b6f783 100644 --- a/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegration.cpp +++ b/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegration.cpp @@ -158,10 +158,8 @@ GHIX11_FindDesktopUriByExec(const char *exec) * * GHI_GetBinaryInfo -- * - * Get binary information. The returned DynBuf contains a formatted string - * \0\0\0\0\0\0... - * consisting of the 'friendly name' (ie 'Microsoft Word') and the icons - * in various sizes for the application. + * Get binary information. Returns the 'friendly name' of the application, and + * a list of various sized icons (depending on the icons provided by the app). * * Results: * TRUE if everything is successful. @@ -174,10 +172,11 @@ GHIX11_FindDesktopUriByExec(const char *exec) */ Bool -GHI_GetBinaryInfo(const char *pathUriUtf8, // IN: full path to the binary file - DynBuf *buf) // OUT: binary information +GHI_GetBinaryInfo(const char *pathUriUtf8, // IN: full path to the binary file + std::string &friendlyName, // OUT: friendly (long) name + std::list &iconList) // OUT: List of app icons { - return GHIPlatformGetBinaryInfo(ghiPlatformData, pathUriUtf8, buf); + return GHIPlatformGetBinaryInfo(ghiPlatformData, pathUriUtf8, friendlyName, iconList); } diff --git a/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegration.h b/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegration.h index 615dc30e0..13891d2a1 100644 --- a/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegration.h +++ b/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegration.h @@ -25,9 +25,14 @@ #ifndef _GH_INTEGRATION_H_ #define _GH_INTEGRATION_H_ -#if defined(__cplusplus) && !defined(OPEN_VM_TOOLS) && !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__) +#if defined(__cplusplus) +#if !defined(OPEN_VM_TOOLS) && !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__) #include "appUtilFileTypes.h" -#endif // __cplusplus && !OPEN_VM_TOOLS && !__FREEBSD__ && !sun && !__APPLE__ +#endif // !OPEN_VM_TOOLS && !__FREEBSD__ && !sun && !__APPLE__ +#include +#include +#include +#endif // __cplusplus #ifdef __cplusplus extern "C" { @@ -51,8 +56,6 @@ Bool GHI_IsSupported(void); void GHI_Init(GMainLoop *mainLoop, const char **envp, GHIHostCallbacks hostCallbacks); void GHI_Cleanup(void); -Bool GHI_GetBinaryInfo(const char *pathUriUtf8, DynBuf *buf); - Bool GHI_OpenStartMenuTree(const char *rootUtf8, uint32 flags, DynBuf *buf); Bool GHI_GetStartMenuItem(uint32 handle, uint32 itemIndex, DynBuf *buf); Bool GHI_CloseStartMenuTree(uint32 handle); @@ -103,6 +106,13 @@ void GHI_UnregisterNotifyIconCallback(vmware::tools::NotifyIconCallback *notifyI const FileTypeList& GHI_GetBinaryHandlers(const char *pathUtf8); #endif // !OPEN_VM_TOOLS && !__FreeBSD__ && !sun && !__APPLE__ +typedef struct GHIBinaryIconInfo { + uint32 width; + uint32 height; + std::vector dataBGRA; +} GHIBinaryIconInfo; + +Bool GHI_GetBinaryInfo(const char *pathUriUtf8, std::string &friendlyName, std::list &iconList); #endif // __cplusplus #endif // _GH_INTEGRATION_H_ diff --git a/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegrationInt.h b/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegrationInt.h index fc2b27c26..12295ecad 100644 --- a/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegrationInt.h +++ b/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegrationInt.h @@ -44,9 +44,6 @@ typedef struct _GHIPlatform GHIPlatform; Bool GHIPlatformIsSupported(void); GHIPlatform *GHIPlatformInit(GMainLoop *mainLoop, const char **envp, GHIHostCallbacks hostcallbacks); void GHIPlatformCleanup(GHIPlatform *ghip); -Bool GHIPlatformGetBinaryInfo(GHIPlatform *ghip, - const char *pathURIUtf8, - DynBuf *buf); Bool GHIPlatformOpenStartMenuTree(GHIPlatform *ghip, const char *rootUtf8, uint32 flags, @@ -135,6 +132,8 @@ void GHIPlatformUnregisterNotifyIconCallback(vmware::tools::NotifyIconCallback * const FileTypeList& GHIPlatformGetBinaryHandlers(GHIPlatform *ghip, const char *pathUtf8); #endif // !OPEN_VM_TOOLS && !__FreeBSD__ && !sun && !__APPLE__ +Bool GHIPlatformGetBinaryInfo(GHIPlatform *ghip, const char *pathUriUtf8, std::string &friendlyName, std::list &iconList); + #endif // __cplusplus #endif // _GH_INTEGRATION_INT_H_ diff --git a/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegrationX11.cpp b/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegrationX11.cpp index 9bbce4961..b6f381228 100644 --- a/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegrationX11.cpp +++ b/open-vm-tools/services/plugins/unity/ghIntegration/ghIntegrationX11.cpp @@ -573,7 +573,7 @@ void GHIPlatformUnregisterNotifyIconCallback(NotifyIconCallback *notifyIconCallb * GHIPlatformCollectIconInfo -- * * Sucks all the icon information for a particular application from the system, and - * appends it into the DynBuf for returning to the host. + * appends it into the icon list for returning to the host. * * Results: * None. @@ -585,14 +585,12 @@ void GHIPlatformUnregisterNotifyIconCallback(NotifyIconCallback *notifyIconCallb */ static void -GHIPlatformCollectIconInfo(GHIPlatform *ghip, // IN - GHIMenuItem *ghm, // IN - unsigned long windowID, // IN - DynBuf *buf) // IN/OUT +GHIPlatformCollectIconInfo(GHIPlatform *ghip, // IN + GHIMenuItem *ghm, // IN + unsigned long windowID, // IN + std::list &iconList) // OUT: Icons { GPtrArray *pixbufs; - char tbuf[1024]; - gsize totalIconBytes; char *ctmp = NULL; unsigned int i; @@ -604,99 +602,39 @@ GHIPlatformCollectIconInfo(GHIPlatform *ghip, // IN pixbufs = AppUtil_CollectIconArray(ctmp, windowID); /* - * Now see if all of these icons can fit into our reply. + * Now that we actually have all available icons loaded and checked, dump their + * contents into the list. */ - totalIconBytes = DynBuf_GetSize(buf); - for (i = 0; i < pixbufs->len; i++) { - gsize thisIconBytes; - GdkPixbuf *pixbuf = (GdkPixbuf *) g_ptr_array_index(pixbufs, i); - - thisIconBytes = ICON_SPACE_PADDING; // Space used by the width/height/size strings, and breathing room - thisIconBytes += gdk_pixbuf_get_width(pixbuf) - * gdk_pixbuf_get_height(pixbuf) - * 4 /* image will be BGRA */; - if ((thisIconBytes + totalIconBytes) < GUESTMSG_MAX_IN_SIZE) { - totalIconBytes += thisIconBytes; - } else if (pixbufs->len == 1) { - GdkPixbuf *newIcon; - volatile double newWidth; - volatile double newHeight; - volatile double scaleFactor; - - newWidth = gdk_pixbuf_get_width(pixbuf); - newHeight = gdk_pixbuf_get_height(pixbuf); - scaleFactor = (GUESTMSG_MAX_IN_SIZE - totalIconBytes - ICON_SPACE_PADDING); - scaleFactor /= (newWidth * newHeight * 4.0); - if (scaleFactor > 0.95) { - /* - * Ensures that we remove at least a little bit of data from the icon. - * Otherwise we can get things like scalefactors of '0.999385' which result - * in an image of exactly the same size. A scaleFactor of 0.95 will remove at - * least one row or column from any icon large enough to go past the limit. - */ - scaleFactor = 0.95; - } - - newWidth *= scaleFactor; - newHeight *= scaleFactor; - - /* - * If this is the only icon available, try scaling it down to the largest icon - * that will comfortably fit in the reply. - * - * Adding 0.5 to newWidth & newHeight is an easy way of rounding to the closest - * integer. - */ - newIcon = gdk_pixbuf_scale_simple(pixbuf, - (int)(newWidth + 0.5), - (int)(newHeight + 0.5), - GDK_INTERP_HYPER); - g_object_unref(G_OBJECT(pixbuf)); - g_ptr_array_index(pixbufs, i) = newIcon; - i--; // Try including the newly scaled-down icon - } else { - g_object_unref(G_OBJECT(pixbuf)); - g_ptr_array_remove_index_fast(pixbufs, i); - i--; - } - } - - /* - * Now that we actually have all available icons loaded and checked, dump their count - * and contents into the reply. - */ - Str_Sprintf(tbuf, sizeof tbuf, "%u", pixbufs->len); - DynBuf_AppendString(buf, tbuf); for (i = 0; i < pixbufs->len; i++) { - int width; - int height; GdkPixbuf *pixbuf; guchar *pixels; int x, y; + int width, height; int rowstride; int n_channels; + GHIBinaryIconInfo iconInfo = { 0 }; + unsigned char* bgra = NULL; pixbuf = (GdkPixbuf *) g_ptr_array_index(pixbufs, i); width = gdk_pixbuf_get_width(pixbuf); height = gdk_pixbuf_get_height(pixbuf); - Str_Sprintf(tbuf, sizeof tbuf, "%d", width); - DynBuf_AppendString(buf, tbuf); - Str_Sprintf(tbuf, sizeof tbuf, "%d", height); - DynBuf_AppendString(buf, tbuf); - Str_Sprintf(tbuf, sizeof tbuf, "%d", width * height * 4); - DynBuf_AppendString(buf, tbuf); + iconInfo.width = width; + iconInfo.height = height; ASSERT (gdk_pixbuf_get_colorspace (pixbuf) == GDK_COLORSPACE_RGB); ASSERT (gdk_pixbuf_get_bits_per_sample (pixbuf) == 8); rowstride = gdk_pixbuf_get_rowstride(pixbuf); n_channels = gdk_pixbuf_get_n_channels(pixbuf); pixels = gdk_pixbuf_get_pixels(pixbuf); + + // Resize the destination BGRA vector to hold the pixel data. + iconInfo.dataBGRA.resize(iconInfo.width * iconInfo.height * 4); + bgra = &iconInfo.dataBGRA[0]; for (y = height - 1; y >= 0; y--) { // GetBinaryInfo icons are bottom-to-top. :( for (x = 0; x < width; x++) { - char bgra[4]; guchar *p; // Pointer to RGBA data in GdkPixbuf p = pixels + (y * rowstride) + (x * n_channels); @@ -708,12 +646,11 @@ GHIPlatformCollectIconInfo(GHIPlatform *ghip, // IN } else { bgra[3] = 0xFF; } - DynBuf_Append(buf, bgra, 4); + // Step on to the next pixel/group of bytes + bgra += 4; } } - - DynBuf_AppendString(buf, ""); - + iconList.push_back(iconInfo); } AppUtil_FreeIconArray(pixbufs); @@ -743,7 +680,8 @@ GHIPlatformCollectIconInfo(GHIPlatform *ghip, // IN Bool GHIPlatformGetBinaryInfo(GHIPlatform *ghip, // IN: platform-specific state const char *pathURIUtf8, // IN: full path to the binary file - DynBuf *buf) // OUT: binary information + std::string &friendlyName, // OUT: Friendly name + std::list &iconList) // OUT: Icons { #ifdef GTK2 const char *realCmd = NULL; @@ -757,7 +695,6 @@ GHIPlatformGetBinaryInfo(GHIPlatform *ghip, // IN: platform-specific sta ASSERT(ghip); ASSERT(pathURIUtf8); - ASSERT(buf); memset(&state, 0, sizeof state); memset(&uri, 0, sizeof uri); @@ -860,7 +797,7 @@ GHIPlatformGetBinaryInfo(GHIPlatform *ghip, // IN: platform-specific sta } } /* - * Stick the app name into 'buf'. + * Stick the app name into 'friendlyName'. */ if (ghm) { ctmp = g_key_file_get_locale_string(ghm->keyfile, G_KEY_FILE_DESKTOP_GROUP, @@ -868,7 +805,7 @@ GHIPlatformGetBinaryInfo(GHIPlatform *ghip, // IN: platform-specific sta if (!ctmp) { ctmp = g_path_get_basename(realCmd); } - DynBuf_AppendString(buf, ctmp); + friendlyName = ctmp; free(ctmp); } else { /* @@ -881,14 +818,14 @@ GHIPlatformGetBinaryInfo(GHIPlatform *ghip, // IN: platform-specific sta } else { ctmp = (char *) realCmd; } - DynBuf_AppendString(buf, ctmp); + friendlyName = ctmp; } free(freeMe); ctmp = NULL; freeMe = NULL; - GHIPlatformCollectIconInfo(ghip, ghm, windowID, buf); + GHIPlatformCollectIconInfo(ghip, ghm, windowID, iconList); return TRUE; #else // !GTK2 diff --git a/open-vm-tools/services/plugins/unity/ghiTclo.cpp b/open-vm-tools/services/plugins/unity/ghiTclo.cpp index affd0cb9b..931171a53 100644 --- a/open-vm-tools/services/plugins/unity/ghiTclo.cpp +++ b/open-vm-tools/services/plugins/unity/ghiTclo.cpp @@ -55,6 +55,12 @@ extern "C" { static DynBuf gTcloUpdate; +/* + * Overhead of encoding the icon data in a dynbuf - used to make sure we don't + * exceed GUEST_MSG_MAX_IN_SIZE when serializing the icons for an app. + */ +static const int GHI_ICON_OVERHEAD = 1024; + /* *---------------------------------------------------------------------------- @@ -127,8 +133,13 @@ GHITcloGetBinaryInfo(RpcInData *data) // IN/OUT { char *binaryPathUtf8; DynBuf *buf = &gTcloUpdate; + DynBuf iconDataBuf; unsigned int index = 0; Bool ret = TRUE; + std::string friendlyName; + std::list iconList; + char temp[128]; // Used to hold sizes and indices as strings + uint32 serializedIconCount = 0; /* Check our arguments. */ ASSERT(data); @@ -161,7 +172,8 @@ GHITcloGetBinaryInfo(RpcInData *data) // IN/OUT } DynBuf_SetSize(buf, 0); - if (!GHI_GetBinaryInfo(binaryPathUtf8, buf)) { + + if (!GHI_GetBinaryInfo(binaryPathUtf8, friendlyName, iconList)) { Debug("%s: Could not get binary info.\n", __FUNCTION__); ret = RPCIN_SETRETVALS(data, "Could not get binary info", @@ -169,6 +181,59 @@ GHITcloGetBinaryInfo(RpcInData *data) // IN/OUT goto exit; } + /* + * Append the name to the output buffer now. If we fail to get the + * icons, we still want to return the app name. Then the UI can display + * the default icon and correct app name. + * + * The output buffer should look like this: + * \0\0\0\0\0\0... + * + * Note that the icon data is in BGRA format. An alpha channel value of 255 means + * "fully opaque", and an alpha channel value of 0 means "fully transparent". + */ + + DynBuf_AppendString(buf, friendlyName.c_str()); + + if (iconList.size() <= 0) { + Debug("%s: Could not find any icons for path: %s", __FUNCTION__, binaryPathUtf8); + } + + DynBuf_Init(&iconDataBuf); + /* Copy icon info to the output buffer. */ + for (std::list::const_iterator it = iconList.begin(); + it != iconList.end(); + it++) { + /* + * XXX: The backdoor has a maximum RPC data size of 64K - don't attempt to send + * icons larger than this size. + */ + if ((DynBuf_GetSize(&iconDataBuf) + it->dataBGRA.size()) < + GUESTMSG_MAX_IN_SIZE - GHI_ICON_OVERHEAD) { + Str_Sprintf(temp, sizeof temp, "%u", it->width); + DynBuf_AppendString(&iconDataBuf, temp); + + Str_Sprintf(temp, sizeof temp, "%u", it->height); + DynBuf_AppendString(&iconDataBuf, temp); + + Str_Sprintf(temp, sizeof temp, "%u", (int32) it->dataBGRA.size()); + DynBuf_AppendString(&iconDataBuf, temp); + + DynBuf_Append(&iconDataBuf, &(it->dataBGRA[0]), + it->dataBGRA.size()); + DynBuf_AppendString(&iconDataBuf, ""); + + serializedIconCount++; + } + } + + Str_Sprintf(temp, sizeof temp, "%d", serializedIconCount); + DynBuf_AppendString(buf, temp); + + /* Append the icon data */ + DynBuf_Append(buf, DynBuf_Get(&iconDataBuf), DynBuf_GetSize(&iconDataBuf)); + DynBuf_Destroy(&iconDataBuf); + /* * Write the final result into the result out parameters and return! */ diff --git a/open-vm-tools/services/plugins/unity/unityPlugin.cpp b/open-vm-tools/services/plugins/unity/unityPlugin.cpp index d50435c51..37a04e0af 100644 --- a/open-vm-tools/services/plugins/unity/unityPlugin.cpp +++ b/open-vm-tools/services/plugins/unity/unityPlugin.cpp @@ -91,8 +91,9 @@ UnityPlugin::UnityPlugin(ToolsAppCtx *ctx) : mUnityUpdateChannel(NULL) Warning("%s: Unable to initialize Unity update channel.\n", __FUNCTION__); return; } + unityHostCallbacks.updateCbCtx = mUnityUpdateChannel; - Unity_Init(NULL, mUnityUpdateChannel, unityHostCallbacks, ctx->serviceObj); + Unity_Init(NULL, unityHostCallbacks, ctx->serviceObj); GHITcloInit(); GHIHostCallbacks ghiHostCallbacks; diff --git a/open-vm-tools/services/plugins/unity/unitylib/unity.c b/open-vm-tools/services/plugins/unity/unitylib/unity.c index e8f539216..dd2f279f5 100644 --- a/open-vm-tools/services/plugins/unity/unitylib/unity.c +++ b/open-vm-tools/services/plugins/unity/unitylib/unity.c @@ -203,13 +203,11 @@ Unity_IsActive(void) void Unity_Init(GuestApp_Dict *conf, // IN - void *updateChannel, // IN UnityHostCallbacks hostCallbacks, // IN gpointer serviceObj) // IN { Debug("Unity_Init\n"); - ASSERT(updateChannel); ASSERT(hostCallbacks.updateCB); ASSERT(hostCallbacks.buildUpdateCB); ASSERT(hostCallbacks.sendWindowContents); @@ -217,7 +215,6 @@ Unity_Init(GuestApp_Dict *conf, // IN ASSERT(hostCallbacks.shouldShowTaskbar); unity.hostCallbacks = hostCallbacks; - unity.updateChannel = updateChannel; /* * Initialize the UnityWindowTracker object. The uwt does all the actual work @@ -233,7 +230,6 @@ Unity_Init(GuestApp_Dict *conf, // IN * Initialize the platform-specific portion of the unity service. */ unity.up = UnityPlatformInit(&unity.tracker, - unity.updateChannel, unity.hostCallbacks); unity.virtDesktopArray.desktopCount = 0; @@ -777,7 +773,7 @@ UnityUpdateCallbackFn(void *param, // IN: UnityPlatform break; } - unity.hostCallbacks.updateCB(unity.updateChannel, update); + unity.hostCallbacks.updateCB(unity.hostCallbacks.updateCbCtx, update); } diff --git a/open-vm-tools/services/plugins/unity/unitylib/unity.h b/open-vm-tools/services/plugins/unity/unitylib/unity.h index 1b7c4b6f9..24acdcaf3 100644 --- a/open-vm-tools/services/plugins/unity/unitylib/unity.h +++ b/open-vm-tools/services/plugins/unity/unitylib/unity.h @@ -141,6 +141,9 @@ typedef struct UnityHostCallbacks { UnitySendWindowContentsFn sendWindowContents; UnitySendRequestMinimizeOperationFn sendRequestMinimizeOperation; UnityShouldShowTaskbarFn shouldShowTaskbar; + + // Context/Cookie passed to buildUpdateCB and updateCB + void *updateCbCtx; } UnityHostCallbacks; #ifdef __cplusplus @@ -148,7 +151,6 @@ extern "C" { #endif // __cplusplus void Unity_Init(GuestApp_Dict *conf, - void *updateChannel, UnityHostCallbacks hostCallbacks, gpointer serviceObj); Bool Unity_IsActive(void); diff --git a/open-vm-tools/services/plugins/unity/unitylib/unityInt.h b/open-vm-tools/services/plugins/unity/unitylib/unityInt.h index 2a524ec5f..f1ee7bf1c 100644 --- a/open-vm-tools/services/plugins/unity/unitylib/unityInt.h +++ b/open-vm-tools/services/plugins/unity/unitylib/unityInt.h @@ -45,7 +45,6 @@ typedef struct UnityState { Bool isEnabled; uint32 currentOptions; // Last feature mask received via 'set.options' UnityVirtualDesktopArray virtDesktopArray; // Virtual desktop configuration - void *updateChannel; // Unity update transmission channel. UnityHostCallbacks hostCallbacks; // Callbacks to the host for unity updates UnityPlatform *up; // Platform-specific state gpointer serviceObj; // 'Plugin' Host service object - used for signaling Unity state diff --git a/open-vm-tools/services/plugins/unity/unitylib/unityPlatform.h b/open-vm-tools/services/plugins/unity/unitylib/unityPlatform.h index 953137f91..3935d2b1e 100644 --- a/open-vm-tools/services/plugins/unity/unitylib/unityPlatform.h +++ b/open-vm-tools/services/plugins/unity/unitylib/unityPlatform.h @@ -48,7 +48,6 @@ extern "C" { Bool UnityPlatformIsSupported(void); UnityPlatform *UnityPlatformInit(UnityWindowTracker *tracker, - void *updateChannel, UnityHostCallbacks hostCallbacks); void UnityPlatformCleanup(UnityPlatform *up); Bool UnityPlatformUpdateWindowState(UnityPlatform *up, diff --git a/open-vm-tools/services/plugins/unity/unitylib/unityPlatformX11.c b/open-vm-tools/services/plugins/unity/unitylib/unityPlatformX11.c index 609d0f446..5ca3c31d9 100644 --- a/open-vm-tools/services/plugins/unity/unitylib/unityPlatformX11.c +++ b/open-vm-tools/services/plugins/unity/unitylib/unityPlatformX11.c @@ -159,20 +159,17 @@ UnityPlatformIsSupported(void) UnityPlatform * UnityPlatformInit(UnityWindowTracker *tracker, // IN - void *updateChannel, // IN UnityHostCallbacks hostCallbacks) // IN: { UnityPlatform *up; char *displayName; ASSERT(tracker); - ASSERT(updateChannel); Debug("UnityPlatformInit: Running\n"); up = Util_SafeCalloc(1, sizeof *up); up->tracker = tracker; - up->updateChannel = updateChannel; up->hostCallbacks = hostCallbacks; up->savedScreenSaverTimeout = -1; @@ -2933,7 +2930,6 @@ UnityPlatformDoUpdate(UnityPlatform *up, // IN: int flags = 0; ASSERT(up); - ASSERT(up->updateChannel); if (incremental) { flags |= UNITY_UPDATE_INCREMENTAL; @@ -2945,7 +2941,7 @@ UnityPlatformDoUpdate(UnityPlatform *up, // IN: UnityPlatformUpdateWindowState(up, up->tracker); } - up->hostCallbacks.buildUpdateCB(up->updateChannel, flags); + up->hostCallbacks.buildUpdateCB(up->hostCallbacks.updateCbCtx, flags); } diff --git a/open-vm-tools/services/plugins/unity/unitylib/unityX11.h b/open-vm-tools/services/plugins/unity/unitylib/unityX11.h index 266e821a8..f65e7a671 100644 --- a/open-vm-tools/services/plugins/unity/unitylib/unityX11.h +++ b/open-vm-tools/services/plugins/unity/unitylib/unityX11.h @@ -252,7 +252,6 @@ struct _UnityPlatform { UnityWindowTracker *tracker; UnityHostCallbacks hostCallbacks; - void *updateChannel; /* * This tracks all toplevel windows, whether or not they are showing through to the