VirtualBox

Ignore:
Timestamp:
Dec 11, 2013 4:27:39 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
91244
Message:

Additions/x11: make vboxvideo dynamic resizing compatible with what the KMS/modesetting drivers can do.

Location:
trunk/src/VBox/Additions/x11/VBoxClient
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/Makefile.kmk

    r49643 r49877  
    3030endif
    3131VBoxClient_DEFS.linux += _GNU_SOURCE
     32ifdef VBOX_WITH_GUEST_KMS_DRIVER
     33 VBoxClient_DEFS += VBOX_WITH_GUEST_KMS_DRIVER
     34endif
    3235VBoxClient_SOURCES = \
    3336        main.cpp
  • trunk/src/VBox/Additions/x11/VBoxClient/display.cpp

    r44967 r49877  
    4848        rc = VERR_NOT_SUPPORTED;
    4949    if (RT_SUCCESS(rc))
     50    {
    5051        rc = VbglR3CtlFilterMask(VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST, 0);
     52#ifdef VBOX_WITH_GUEST_KMS_DRIVER
     53        if (RT_SUCCESS(rc))
     54            VbglR3SetGuestCaps(VMMDEV_GUEST_SUPPORTS_GRAPHICS, 0);
     55#endif
     56    }
    5157    else
    5258        VbglR3CtlFilterMask(0, VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
     
    6874    if (RT_FAILURE(rc))
    6975    {
    70         VbglR3CtlFilterMask(0, VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED);
     76        VbglR3CtlFilterMask(0,   VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED
     77                               | VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
     78#ifdef VBOX_WITH_GUEST_KMS_DRIVER
     79        VbglR3SetGuestCaps(0, VMMDEV_GUEST_SUPPORTS_GRAPHICS);
     80#endif
    7181        VbglR3SetMouseStatus(  fMouseFeatures
    7282                             | VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR);
     
    8292    VbglR3CtlFilterMask(0,   VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST
    8393                           | VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED);
     94#ifdef VBOX_WITH_GUEST_KMS_DRIVER
     95    VbglR3SetGuestCaps(0, VMMDEV_GUEST_SUPPORTS_GRAPHICS);
     96#endif
    8497    int rc = VbglR3GetMouseStatus(&fMouseFeatures, NULL, NULL);
    8598    if (RT_SUCCESS(rc))
     
    223236                            {
    224237                                RTStrPrintf(szCommand, sizeof(szCommand),
    225                                             "%s --output VBOX%u --set VBOX_MODE %dx%d",
    226                                             pcszXrandr, iDisplay, cx, cy);
     238                                            "%s --output VGA-%u --set VBOX_MODE %d",
     239                                            pcszXrandr, iDisplay,
     240                                            (cx & 0xffff) << 16 | (cy & 0xffff));
    227241                                system(szCommand);
    228242                            }
     
    231245                            {
    232246                                RTStrPrintf(szCommand, sizeof(szCommand),
    233                                             "%s --output VBOX%u --auto --pos %dx%d",
     247                                            "%s --output VGA-%u --auto --pos %dx%d",
    234248                                            pcszXrandr, iDisplay, cxOrg, cyOrg);
    235249                                system(szCommand);
    236250                            }
    237251                            RTStrPrintf(szCommand, sizeof(szCommand),
    238                                         "%s --output VBOX%u --preferred",
     252                                        "%s --output VGA-%u --preferred",
    239253                                        pcszXrandr, iDisplay);
    240254                            system(szCommand);
     
    243257                        {
    244258                            RTStrPrintf(szCommand, sizeof(szCommand),
    245                                         "%s --output VBOX%u --off",
     259                                        "%s --output VGA-%u --off",
    246260                                         pcszXrandr, iDisplay);
    247261                            system(szCommand);
     
    253267                        {
    254268                            RTStrPrintf(szCommand, sizeof(szCommand),
    255                                         "%s --output VBOX%u --set VBOX_MODE %dx%d",
    256                                         pcszXrandr, iDisplay, cx, cy);
     269                                        "%s --output VGA-%u --set VBOX_MODE %d",
     270                                        pcszXrandr, iDisplay,
     271                                        (cx & 0xffff) << 16 | (cy & 0xffff));
    257272                            system(szCommand);
    258273                            RTStrPrintf(szCommand, sizeof(szCommand),
    259                                         "%s --output VBOX%u --preferred",
     274                                        "%s --output VGA-%u --preferred",
    260275                                        pcszXrandr, iDisplay);
    261276                            system(szCommand);
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