Fix a crash when rotating the screen.
Remember output->crtc before setting a NULL mode because RRCrtcNotify now sets output->crtc to NULL. Use the saved crtc to set the new mode.
This commit is contained in:
parent
a93033b0bc
commit
aec0d06469
|
@ -738,6 +738,7 @@ ProcRRSetScreenConfig (ClientPtr client)
|
||||||
int rate;
|
int rate;
|
||||||
Bool has_rate;
|
Bool has_rate;
|
||||||
RROutputPtr output;
|
RROutputPtr output;
|
||||||
|
RRCrtcPtr crtc;
|
||||||
RRModePtr mode;
|
RRModePtr mode;
|
||||||
RR10DataPtr pData = NULL;
|
RR10DataPtr pData = NULL;
|
||||||
RRScreenSizePtr pSize;
|
RRScreenSizePtr pSize;
|
||||||
|
@ -783,7 +784,9 @@ ProcRRSetScreenConfig (ClientPtr client)
|
||||||
rep.status = RRSetConfigFailed;
|
rep.status = RRSetConfigFailed;
|
||||||
goto sendReply;
|
goto sendReply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
crtc = output->crtc;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* if the client's config timestamp is not the same as the last config
|
* if the client's config timestamp is not the same as the last config
|
||||||
* timestamp, then the config information isn't up-to-date and
|
* timestamp, then the config information isn't up-to-date and
|
||||||
|
@ -831,7 +834,7 @@ ProcRRSetScreenConfig (ClientPtr client)
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((~output->crtc->rotations) & rotation)
|
if ((~crtc->rotations) & rotation)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* requested rotation or reflection not supported by screen
|
* requested rotation or reflection not supported by screen
|
||||||
|
@ -914,7 +917,7 @@ ProcRRSetScreenConfig (ClientPtr client)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!RRCrtcSet (output->crtc, mode, 0, 0, stuff->rotation, 1, &output))
|
if (!RRCrtcSet (crtc, mode, 0, 0, stuff->rotation, 1, &output))
|
||||||
rep.status = RRSetConfigFailed;
|
rep.status = RRSetConfigFailed;
|
||||||
else
|
else
|
||||||
rep.status = RRSetConfigSuccess;
|
rep.status = RRSetConfigSuccess;
|
||||||
|
|
Loading…
Reference in New Issue