From a82f10c5dd9fa74ff18759ab288bbd9c8b7ac4de Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 8 Dec 2008 17:42:47 -0500 Subject: randr: clear primaryOutput when the output is deleted (cherry picked from commit 86c64ddf21763972aa7fc8c5770259123c9907b3) --- randr/rroutput.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/randr/rroutput.c b/randr/rroutput.c index 48b5700c8..82c2530fe 100644 --- a/randr/rroutput.c +++ b/randr/rroutput.c @@ -380,6 +380,9 @@ RROutputDestroyResource (pointer value, XID pid) { rrScrPriv(pScreen); int i; + + if (pScrPriv->primaryOutput == output) + pScrPriv->primaryOutput = NULL; for (i = 0; i < pScrPriv->numOutputs; i++) { -- cgit v1.2.3