VirtualBox

Changeset 53552 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Dec 16, 2014 8:45:06 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
97307
Message:

Additions/x11/VBoxClient: do not bail out if xrandr fails, as this is usually due to an inherent race in the protocol.

File:
1 edited

Legend:

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

    r53515 r53552  
    121121{
    122122    char szCommand[256];
    123     int status;
    124123    uint32_t i;
    125124
     125    /** @note The xrandr command can fail if something else accesses RandR at
     126     *  the same time.  We just ignore failure for now and let the user try
     127     *  again as we do not know what someone else is doing. */
    126128    if (iDisplay >= pState->cSizeHints)
    127129    {
     
    149151        RTStrPrintf(szCommand, sizeof(szCommand),
    150152                    "%s -s %ux%u", pState->pcszXrandr, cx, cy);
    151         status = system(szCommand);
    152         if (WEXITSTATUS(status) != 0)
    153             VBClFatalError(("Failed to execute \\\"%s\\\".\n", szCommand));
     153        system(szCommand);
    154154    }
    155155    else
     
    162162                        "%s --output VGA-%u --auto --pos %ux%u",
    163163                        pState->pcszXrandr, iDisplay, x, y);
    164             status = system(szCommand);
    165             if (WEXITSTATUS(status) != 0)
    166                 VBClFatalError(("Failed to execute \\\"%s\\\".\n", szCommand));
     164            system(szCommand);
    167165        }
    168166        if ((!fChangeOrigin || fEnabled) && cx != 0 && cy != 0)
     
    171169                        "%s --output VGA-%u --preferred",
    172170                        pState->pcszXrandr, iDisplay);
    173             status = system(szCommand);
    174             if (WEXITSTATUS(status) != 0)
    175                 VBClFatalError(("Failed to execute \\\"%s\\\".\n", szCommand));
     171            system(szCommand);
    176172        }
    177173        if (!fEnabled)
     
    181177                        "%s --output VGA-%u --off",
    182178                         pState->pcszXrandr, iDisplay);
    183             status = system(szCommand);
    184             if (WEXITSTATUS(status) != 0)
    185                 VBClFatalError(("Failed to execute \\\"%s\\\".\n", szCommand));
     179            system(szCommand);
    186180        }
    187181    }
Note: See TracChangeset for help on using the changeset viewer.

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