From: Kruti Pendharkar Date: Fri, 17 Oct 2025 04:25:48 +0000 (-0700) Subject: Change to common source files not applicable to open-vm-tools at this time. X-Git-Tag: stable-13.1.0~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9286a686cf006e2f2dc72b66d8e2b1d67632a93d;p=thirdparty%2Fopen-vm-tools.git Change to common source files not applicable to open-vm-tools at this time. --- diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp b/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp index ac71b9d5f..b28f29559 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp +++ b/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp @@ -272,9 +272,9 @@ CopyPasteDnDX11::Init(ToolsAppCtx *ctx) CopyPasteDnDX11::~CopyPasteDnDX11() { delete m_copyPasteUI; + delete m_dndUI; #ifdef VMTOOLS_USE_LEGACY_GTK - delete m_dndUI; delete m_main; #endif @@ -285,6 +285,7 @@ CopyPasteDnDX11::~CopyPasteDnDX11() if (gUserMainWidget) { + #ifdef VMTOOLS_USE_LEGACY_GTK gtk_widget_destroy(gUserMainWidget); #endif @@ -353,8 +354,6 @@ CopyPasteDnDX11::RegisterDnD() TRACE_CALL(); CopyPasteDnDWrapper *wrapper = CopyPasteDnDWrapper::GetInstance(); - -#ifdef VMTOOLS_USE_LEGACY_GTK if (!wrapper->IsDnDEnabled()) { return FALSE; } @@ -378,10 +377,9 @@ CopyPasteDnDX11::RegisterDnD() } } } - g_debug("%s: dnd is registered? %d\n", __FUNCTION__, (int) wrapper->IsDnDRegistered()); return wrapper->IsDnDRegistered(); -#endif + } @@ -416,10 +414,8 @@ CopyPasteDnDX11::UnregisterDnD() CopyPasteDnDWrapper *wrapper = CopyPasteDnDWrapper::GetInstance(); if (wrapper->IsDnDRegistered()) { -#ifdef VMTOOLS_USE_LEGACY_GTK delete m_dndUI; m_dndUI = nullptr; -#endif wrapper->SetDnDIsRegistered(false); wrapper->SetDnDVersion(-1); @@ -497,10 +493,8 @@ CopyPasteDnDX11::DnDVersionChanged(int version) g_debug("%s: calling VmxDnDVersionChanged (version %d)\n", __FUNCTION__, version); ASSERT(ctx); -#ifdef VMTOOLS_USE_LEGACY_GTK ASSERT(m_dndUI); m_dndUI->VmxDnDVersionChanged(ctx->rpc, version); -#endif } diff --git a/open-vm-tools/services/plugins/dndcp/dndGuestBase/copyPasteDnDX11.h b/open-vm-tools/services/plugins/dndcp/dndGuestBase/copyPasteDnDX11.h index 0d023f790..3b6799331 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuestBase/copyPasteDnDX11.h +++ b/open-vm-tools/services/plugins/dndcp/dndGuestBase/copyPasteDnDX11.h @@ -66,12 +66,13 @@ public: void SetDnDAllowed(bool allowed); void SetCopyPasteAllowed(bool allowed); private: + CopyPasteUIX11 *m_copyPasteUI; #ifdef VMTOOLS_USE_LEGACY_GTK Gtk::Main *m_main; - CopyPasteUIX11 *m_copyPasteUI; - DnDUIX11 *m_dndUI; #endif + + DnDUIX11 *m_dndUI; }; #endif // __COPYPASTEDNDX11_H__ diff --git a/open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnD.hh b/open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnD.hh index cb166512a..f20f8c7e1 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnD.hh +++ b/open-vm-tools/services/plugins/dndcp/dndGuestBase/guestDnD.hh @@ -1,5 +1,6 @@ /********************************************************* - * Copyright (C) 2010-2021 VMware, Inc. All rights reserved. + * Copyright (c) 2010-2025 Broadcom. All Rights Reserved. + * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -39,7 +40,7 @@ extern "C" { #include "vmware/tools/plugin.h" } -#define UNGRAB_TIMEOUT 500 // 0.5s +#define UNGRAB_TIMEOUT 500 // 0.5s #define HIDE_DET_WND_TIMER 500 // 0.5s #define UNITY_DND_DET_TIMEOUT 500 // 0.5s