Skip to content

Commit 4c2cdee

Browse files
committed
[PR #1443] randr: drop internal server reset support
PR: #1443
1 parent 99a9a67 commit 4c2cdee

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

randr/randr.c

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
#include <dix-config.h>
3030

31+
#include <stdbool.h>
32+
3133
#include "dix/screen_hooks_priv.h"
3234
#include "dix/screenint_priv.h"
3335
#include "miext/extinit_priv.h"
@@ -272,27 +274,30 @@ SRRNotifyEvent(xEvent *from, xEvent *to)
272274
}
273275
}
274276

275-
static x_server_generation_t RRGeneration;
277+
static bool initialized = false;
276278

277279
Bool
278280
RRInit(void)
279281
{
280-
if (RRGeneration != serverGeneration) {
281-
if (!RRModeInit())
282-
return FALSE;
283-
if (!RRCrtcInit())
284-
return FALSE;
285-
if (!RROutputInit())
286-
return FALSE;
287-
if (!RRProviderInit())
288-
return FALSE;
289-
if (!RRLeaseInit())
290-
return FALSE;
291-
RRGeneration = serverGeneration;
292-
}
282+
/* prevent double init attempts */
283+
if (initialized)
284+
return TRUE;
285+
286+
if (!RRModeInit())
287+
return FALSE;
288+
if (!RRCrtcInit())
289+
return FALSE;
290+
if (!RROutputInit())
291+
return FALSE;
292+
if (!RRProviderInit())
293+
return FALSE;
294+
if (!RRLeaseInit())
295+
return FALSE;
296+
293297
if (!dixRegisterPrivateKey(&rrPrivKeyRec, PRIVATE_SCREEN, 0))
294298
return FALSE;
295299

300+
initialized = true;
296301
return TRUE;
297302
}
298303

0 commit comments

Comments
 (0)