The legacy backdoor copy paste (used by ESX) is registered in
an Init function of the X11 UI class. We should only unregister
the legacy copy paste when this class is destructed.
Up to now, were were doing it as a side effect of resetting
dndcp version 3 and higher in response to a reset signal from
the plugin framework. This would cause the backdoor copypaste
code to unregister at reset without being registered once again
because the registration only happened in Init.
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
/**
*
- * Initialize Win32 platform DnD/CP. Initialize OLE, and create detection
+ * Initialize Win32 platform DnD/CP. Initialize Gtk+, and create detection
* windows.
*
* @param[in] ctx tools app context.
if (m_main) {
delete m_main;
}
+
+ /*
+ * Legacy CP.
+ */
+ CopyPaste_Unregister(gUserMainWidget);
+
if (gUserMainWidget) {
gtk_widget_destroy(gUserMainWidget);
}
delete m_copyPasteUI;
m_copyPasteUI = NULL;
}
-
- /*
- * Legacy CP.
- */
- CopyPaste_Unregister(gUserMainWidget);
wrapper->SetCPIsRegistered(FALSE);
wrapper->SetCPVersion(-1);
}