mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-03 15:58:09 +02:00
Merge branch 'master' into 'master'
randr: clear primary screen's primaryOutput when the output is deleted See merge request xorg/xserver!1553
This commit is contained in:
commit
c9fc81a8af
1 changed files with 11 additions and 0 deletions
|
|
@ -377,6 +377,8 @@ RROutputDestroyResource(void *value, XID pid)
|
|||
{
|
||||
RROutputPtr output = (RROutputPtr) value;
|
||||
ScreenPtr pScreen = output->pScreen;
|
||||
ScreenPtr primary;
|
||||
rrScrPrivPtr primarysp;
|
||||
int m;
|
||||
|
||||
if (pScreen) {
|
||||
|
|
@ -397,6 +399,15 @@ RROutputDestroyResource(void *value, XID pid)
|
|||
if (pScrPriv->primaryOutput == output)
|
||||
pScrPriv->primaryOutput = NULL;
|
||||
|
||||
if (pScreen->isGPU) {
|
||||
primary = pScreen->current_primary;
|
||||
if (primary) {
|
||||
primarysp = rrGetScrPriv(primary);
|
||||
if(primarysp->primaryOutput == output)
|
||||
primarysp->primaryOutput = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < pScrPriv->numOutputs; i++) {
|
||||
if (pScrPriv->outputs[i] == output) {
|
||||
memmove(pScrPriv->outputs + i, pScrPriv->outputs + i + 1,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue