VirtualBox

Changeset 89598 in vbox


Ignore:
Timestamp:
Jun 10, 2021 12:46:07 PM (3 years ago)
Author:
vboxsync
Message:

Additions: X11: VMSVGA: attempt to fix black screen when X11 has no VMWARE_CTRL extension, bugref#10028.

  • Prevent VBoxClient from sending uninitialised buffer to host,
  • Add XSync/XFlush calls on error path handling, so XServer does not stuck with black screen,
  • Update logging.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp

    r86887 r89598  
    499499    int rc = VbglR3SeamlessSendMonitorPositions(cPositions, pPositions);
    500500    if (RT_SUCCESS(rc))
    501         VBClLogError("Sending monitor positions (%u of them)  to the host: %Rrc\n", cPositions, rc);
     501        VBClLogInfo("Sending monitor positions (%u of them)  to the host: %Rrc\n", cPositions, rc);
    502502    else
    503503        VBClLogError("Error during sending monitor positions (%u of them)  to the host: %Rrc\n", cPositions, rc);
     
    538538        for (int i = 0; i < iMonitorCount; ++i)
    539539        {
    540             int iMonitorID = getMonitorIdFromName(XGetAtomName(x11Context.pDisplayRandRMonitoring, pMonitorInfo[i].name)) - 1;
     540            int iMonitorID = getMonitorIdFromName(XGetAtomName(x11Context.pDisplayRandRMonitoring, pMonitorInfo[i].name));
    541541            if (iMonitorID >= x11Context.hOutputCount || iMonitorID == -1)
     542            {
     543                VBClLogInfo("queryMonitorPositions: skip monitor %d (id %d, %s) (w,h)=(%d,%d) (x,y)=(%d,%d)\n",
     544                        i, iMonitorID, XGetAtomName(x11Context.pDisplayRandRMonitoring, pMonitorInfo[i].name),
     545                        pMonitorInfo[i].width, pMonitorInfo[i].height,
     546                        pMonitorInfo[i].x, pMonitorInfo[i].y);
    542547                continue;
     548            }
    543549            VBClLogInfo("Monitor %d (w,h)=(%d,%d) (x,y)=(%d,%d)\n",
    544550                        i,
     
    10611067    if (!event || newSize.width != (int)iXRes || newSize.height != (int)iYRes)
    10621068    {
    1063         VBClLogError("Resizing frame buffer to %d %d has failed\n", iXRes, iYRes);
     1069        VBClLogError("Resizing frame buffer to %d %d has failed, current mode %d %d\n",
     1070            iXRes, iYRes, newSize.width, newSize.height);
    10641071        return false;
    10651072    }
     
    12101217    {
    12111218        XUngrabServer(x11Context.pDisplay);
     1219        XFlush(x11Context.pDisplay);
    12121220        return;
    12131221    }
     
    12321240            VBClLogFatalError("Crtc disable failed %lu\n", pOutputInfo->crtc);
    12331241            XUngrabServer(x11Context.pDisplay);
     1242            XSync(x11Context.pDisplay, False);
    12341243#ifdef WITH_DISTRO_XRAND_XINERAMA
    12351244            XRRFreeScreenResources(x11Context.pScreenResources);
     
    12381247                x11Context.pXRRFreeScreenResources(x11Context.pScreenResources);
    12391248#endif
     1249            XFlush(x11Context.pDisplay);
    12401250            return;
    12411251        }
     
    12511261    {
    12521262        XUngrabServer(x11Context.pDisplay);
     1263        XSync(x11Context.pDisplay, False);
    12531264#ifdef WITH_DISTRO_XRAND_XINERAMA
    12541265        XRRFreeScreenResources(x11Context.pScreenResources);
     
    12571268            x11Context.pXRRFreeScreenResources(x11Context.pScreenResources);
    12581269#endif
     1270        XFlush(x11Context.pDisplay);
    12591271        return;
    12601272    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette