mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-28 23:50:08 +01:00
fbdevhw: Use displayWidth for fbdev virtual width when appropriate.
The fbdev API doesn't allow setting the pitch explicitly, so we have to set
the virtual width to the pitch we're using for drawing. This fixes corruption
after changing the virtual width with RandR.
(cherry picked from commit d077c0da47)
This commit is contained in:
parent
28af734cb7
commit
d7bcad9c69
1 changed files with 2 additions and 1 deletions
|
|
@ -183,7 +183,8 @@ print_xfree_mode(char *txt, DisplayModePtr mode)
|
|||
static void
|
||||
xfree2fbdev_fblayout(ScrnInfoPtr pScrn, struct fb_var_screeninfo *var)
|
||||
{
|
||||
var->xres_virtual = pScrn->virtualX;
|
||||
var->xres_virtual = pScrn->displayWidth ? pScrn->displayWidth :
|
||||
pScrn->virtualX;
|
||||
var->yres_virtual = pScrn->virtualY;
|
||||
var->bits_per_pixel = pScrn->bitsPerPixel;
|
||||
var->red.length = pScrn->weight.red;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue