From 80f49ee703bfbd0f0dfc2bb6dd7d02a982ae9fe6 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 14 Nov 2025 17:25:16 +0100 Subject: [PATCH] randr: drop internal server reset support Signed-off-by: Enrico Weigelt, metux IT consult --- randr/randr.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/randr/randr.c b/randr/randr.c index 4c65c6359e..41b0cf369e 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -28,6 +28,8 @@ #include +#include + #include "dix/screen_hooks_priv.h" #include "dix/screenint_priv.h" #include "miext/extinit_priv.h" @@ -272,27 +274,30 @@ SRRNotifyEvent(xEvent *from, xEvent *to) } } -static x_server_generation_t RRGeneration; +static bool initialized = false; Bool RRInit(void) { - if (RRGeneration != serverGeneration) { - if (!RRModeInit()) - return FALSE; - if (!RRCrtcInit()) - return FALSE; - if (!RROutputInit()) - return FALSE; - if (!RRProviderInit()) - return FALSE; - if (!RRLeaseInit()) - return FALSE; - RRGeneration = serverGeneration; - } + /* prevent double init attempts */ + if (initialized) + return TRUE; + + if (!RRModeInit()) + return FALSE; + if (!RRCrtcInit()) + return FALSE; + if (!RROutputInit()) + return FALSE; + if (!RRProviderInit()) + return FALSE; + if (!RRLeaseInit()) + return FALSE; + if (!dixRegisterPrivateKey(&rrPrivKeyRec, PRIVATE_SCREEN, 0)) return FALSE; + initialized = true; return TRUE; }