From 3880670da1ae6566da7ca944557d197db534e66f Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 3 Sep 2025 16:16:51 +0200 Subject: [PATCH] Xext: panoramix: cache screen pointer locally cache the screen pointer in local variable. follow-up commits will use a generic helper function for retrieving it. Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/panoramiX.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 37b38ff98a..97f90e14ac 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -982,10 +982,12 @@ ProcPanoramiXGetScreenSize(ClientPtr client) if (rc != Success) return rc; + ScreenPtr pScreen = screenInfo.screens[stuff->screen]; + xPanoramiXGetScreenSizeReply reply = { /* screen dimensions */ - .width = screenInfo.screens[stuff->screen]->width, - .height = screenInfo.screens[stuff->screen]->height, + .width = pScreen->width, + .height = pScreen->height, .window = stuff->window, .screen = stuff->screen };