VirtualBox

Changeset 6492 in vbox


Ignore:
Timestamp:
Jan 24, 2008 5:22:43 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27498
Message:

Additions (x11): limit the maximum virtual screen size to 64000x64000 as the X randr extension uses a uint16_t to report it to clients

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/xgraphics/vboxvideo_13.c

    r6484 r6492  
    198198    Bool rc = TRUE;
    199199
    200     TRACE3("width=%d, height=%d\n", width, height);
    201200    /* We only support horizontal resolutions which are a multiple of 8.  Round down if
    202201       necessary. */
     
    224223    }
    225224    if (rc) {
    226         TRACE3("Setting screen pixmap parameters: width=%d, height=%d, depth=%d, bpp=%d, stride=%d, VRAM=%p\n", width, height, scrn->depth, bpp, width * bpp / 8, pVBox->base);
    227225        if (
    228226            !pScreen->ModifyPixmapHeader(pPixmap, width, height,
     
    240238        scrn->displayWidth = width;
    241239    }
    242     TRACE3("returning %s\n", rc ? "TRUE" : "FALSE");
    243240    return rc;
    244241}
     
    250247static void
    251248vbox_crtc_dpms(xf86CrtcPtr crtc, int mode)
    252 { TRACE; (void) crtc; (void) mode; }
     249{ (void) crtc; (void) mode; }
    253250
    254251static Bool
    255252vbox_crtc_lock (xf86CrtcPtr crtc)
    256 { TRACE; (void) crtc; return FALSE; }
     253{ (void) crtc; return FALSE; }
    257254
    258255static Bool
     
    263260    int xRes = adjusted_mode->HDisplay;
    264261
    265     TRACE;
    266262    (void) mode;
    267263    /* We only support horizontal resolutions which are a multiple of 8.  Round down if
     
    274270        adjusted_mode->HDisplay = xRes - (xRes % 8);
    275271    }
    276     TRACE2;
    277272    return TRUE;
    278273}
     
    280275static void
    281276vbox_crtc_stub (xf86CrtcPtr crtc)
    282 { TRACE; (void) crtc; }
     277{ (void) crtc; }
    283278
    284279static void
     
    287282{
    288283    (void) mode;
    289     TRACE;
    290284    VBOXSetMode(crtc->scrn, adjusted_mode);
    291285    VBOXAdjustFrame(crtc->scrn->scrnIndex, x, y, 0);
    292     TRACE2;
    293286}
    294287
     
    296289vbox_crtc_gamma_set (xf86CrtcPtr crtc, CARD16 *red,
    297290                     CARD16 *green, CARD16 *blue, int size)
    298 { TRACE; (void) crtc; (void) red; (void) green; (void) blue; (void) size; }
     291{ (void) crtc; (void) red; (void) green; (void) blue; (void) size; }
    299292
    300293static void *
    301294vbox_crtc_shadow_allocate (xf86CrtcPtr crtc, int width, int height)
    302 { TRACE; (void) crtc; (void) width; (void) height; return NULL; }
     295{ (void) crtc; (void) width; (void) height; return NULL; }
    303296
    304297static const xf86CrtcFuncsRec VBOXCrtcFuncs = {
     
    327320static void
    328321vbox_output_stub (xf86OutputPtr output)
    329 { TRACE; (void) output; }
     322{ (void) output; }
    330323
    331324static void
    332325vbox_output_dpms (xf86OutputPtr output, int mode)
    333 { TRACE; (void) output; (void) mode; }
     326{ (void) output; (void) mode; }
    334327
    335328static int
    336329vbox_output_mode_valid (xf86OutputPtr output, DisplayModePtr mode)
    337330{
    338     TRACE3("Modeline %s   %f  %d %d %d %d  %d %d %d %d\n",
    339            mode->name, mode->Clock * 1.0 / 1000, mode->HDisplay, mode->HSyncStart,
    340            mode->HSyncEnd, mode->HTotal, mode->VDisplay, mode->VSyncStart,
    341            mode->VSyncEnd, mode->VTotal);
    342331    (void) output; (void) mode;
    343332    return MODE_OK;
     
    347336vbox_output_mode_fixup (xf86OutputPtr output, DisplayModePtr mode,
    348337                        DisplayModePtr adjusted_mode)
    349 { TRACE; (void) output; (void) mode; (void) adjusted_mode; return TRUE; }
     338{ (void) output; (void) mode; (void) adjusted_mode; return TRUE; }
    350339
    351340static void
    352341vbox_output_mode_set (xf86OutputPtr output, DisplayModePtr mode,
    353342                        DisplayModePtr adjusted_mode)
    354 { TRACE; (void) output; (void) mode; (void) adjusted_mode; }
     343{ (void) output; (void) mode; (void) adjusted_mode; }
    355344
    356345/* A virtual monitor is always connected. */
     
    396385    ScrnInfoPtr pScrn = output->scrn;
    397386
    398     TRACE;
    399387    rc = vboxGetDisplayChangeRequest(pScrn, &x, &y, &bpp, 0, 0);
    400388    if (RT_SUCCESS(rc) && (0 != x) && (0 != y)) {
    401         TRACE3("Adding host mode %dx%d\n", x, y);
    402389        vbox_output_add_mode(&pModes, NULL, x, y, TRUE);
    403390        vbox_output_add_mode(&pModes, "1024x768", 1024, 768, FALSE);
     
    409396        vbox_output_add_mode(&pModes, "640x480", 640, 480, FALSE);
    410397    }
    411     TRACE2;
    412398    return pModes;
    413399}
     
    418404vbox_output_set_property(xf86OutputPtr output, Atom property,
    419405                         RRPropertyValuePtr value)
    420 { TRACE; (void) output, (void) property, (void) value; return FALSE; }
     406{ (void) output, (void) property, (void) value; return FALSE; }
    421407#endif
    422408
     
    732718
    733719    /* Set a sane minimum and maximum mode size */
    734     xf86CrtcSetSizeRange(pScrn, 64, 64, 102400, 76800);
     720    xf86CrtcSetSizeRange(pScrn, 64, 64, 64000, 64000);
    735721
    736722    /* I don't know exactly what these are for (and they are only used in a couple
     
    738724       an upper limit on possible resolutions.  To add to the fun, they get set
    739725       automatically if we don't do it ourselves. */
    740     pScrn->display->virtualX = 102400;
    741     pScrn->display->virtualY = 76800;
     726    pScrn->display->virtualX = 64000;
     727    pScrn->display->virtualY = 64000;
    742728
    743729    /* We are not interested in the monitor section in the configuration file. */
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