From 1e88b2fa375b9fe7fe30787e2ef366a1bfba3270 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Sat, 25 Nov 2023 17:23:19 +0100 Subject: [PATCH] [client,x11] query correct display --- client/X11/xf_monitor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/X11/xf_monitor.c b/client/X11/xf_monitor.c index 8bc38d0a9..c7a9661a8 100644 --- a/client/X11/xf_monitor.c +++ b/client/X11/xf_monitor.c @@ -68,11 +68,11 @@ int xf_list_monitors(xfContext* xfc) #if defined(USABLE_XRANDR) - if (XRRQueryExtension(xfc->display, &major, &minor) && - (XRRQueryVersion(xfc->display, &major, &minor) == True) && (major * 100 + minor >= 105)) + if (XRRQueryExtension(display, &major, &minor) && + (XRRQueryVersion(display, &major, &minor) == True) && (major * 100 + minor >= 105)) { XRRMonitorInfo* monitors = - XRRGetMonitors(xfc->display, DefaultRootWindow(xfc->display), 1, &nmonitors); + XRRGetMonitors(display, DefaultRootWindow(display), 1, &nmonitors); for (i = 0; i < nmonitors; i++) {