1
0
forked from pool/virtualbox
virtualbox/VirtualBox-6.1.4-VBoxClient-vmsvga-x11-crash.patch
Larry Finger d8ce0b3983 Accepting request 789598 from home:lwfinger:branches:Virtualization
- Fix build errors for gcc-10 (boo#1167897). File "fixes_for_gcc10.patch" is
  added.
- Convert /usr/bin/VirtualBox to use "~/.config/VirtualBox" instead "~/.vbox".
  This change was requested in boo#1167660.

OBS-URL: https://build.opensuse.org/request/show/789598
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=543
2020-03-30 04:53:46 +00:00

67 lines
2.2 KiB
Diff

Index: VirtualBox-6.1.4/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
===================================================================
--- VirtualBox-6.1.4.orig/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
+++ VirtualBox-6.1.4/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
@@ -100,16 +100,19 @@ static void x11Connect(struct X11CONTEXT
{
XCloseDisplay(pContext->pDisplay);
pContext->pDisplay = NULL;
+ return;
}
if (!XRRQueryExtension(pContext->pDisplay, &pContext->hRandREventBase, &pContext->hRandRErrorBase))
{
XCloseDisplay(pContext->pDisplay);
pContext->pDisplay = NULL;
+ return;
}
if (!XRRQueryVersion(pContext->pDisplay, &pContext->hRandRMajor, &pContext->hRandRMinor))
{
XCloseDisplay(pContext->pDisplay);
pContext->pDisplay = NULL;
+ return;
}
pContext->rootWindow = DefaultRootWindow(pContext->pDisplay);
}
Index: VirtualBox-6.1.4/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
===================================================================
--- VirtualBox-6.1.4.orig/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
+++ VirtualBox-6.1.4/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
@@ -215,7 +215,6 @@ DECLCALLBACK(void) ShClX11RequestFromX11
*
* @returns VBox status code.
*/
-#if 0
static int vboxClipboardConnect(void)
{
LogFlowFuncEnter();
@@ -245,7 +244,6 @@ static int vboxClipboardConnect(void)
LogFlowFuncLeaveRC(rc);
return rc;
}
-#endif
/**
* The main loop of our clipboard reader.
@@ -469,7 +467,7 @@ static int run(struct VBCLSERVICE **ppIn
RT_NOREF(ppInterface, fDaemonised);
/* Initialise the guest library. */
- int rc = 0; //vboxClipboardConnect();
+ int rc = vboxClipboardConnect();
if (RT_SUCCESS(rc))
{
#ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE
@@ -477,9 +475,9 @@ static int run(struct VBCLSERVICE **ppIn
if (RT_SUCCESS(rc))
{
#endif
- RTThreadSleep(60 * 1000);
+ // RTThreadSleep(60 * 1000);
- //rc = vboxClipboardMain();
+ rc = vboxClipboardMain();
#ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE
int rc2 = vboxClipboardFUSEStop();