@@ -116,6 +116,7 @@ typedef struct XrandrData
116116{
117117 FF_LIBRARY_SYMBOL (XInternAtom )
118118 FF_LIBRARY_SYMBOL (XGetAtomName );
119+ FF_LIBRARY_SYMBOL (XFree );
119120 FF_LIBRARY_SYMBOL (XRRGetScreenInfo )
120121 FF_LIBRARY_SYMBOL (XRRConfigCurrentConfiguration )
121122 FF_LIBRARY_SYMBOL (XRRConfigCurrentRate )
@@ -207,9 +208,11 @@ static bool xrandrHandleOutput(XrandrData* data, RROutput output, FFstrbuf* name
207208 Atom atomEdid = data -> ffXInternAtom (data -> display , "EDID" , true);
208209 if (atomEdid != None )
209210 {
210- unsigned long nitems = 0 ;
211+ int actual_format = 0 ;
212+ unsigned long nitems = 0 , bytes_after = 0 ;
213+ Atom actual_type = None ;
211214 uint8_t * edidData = NULL ;
212- if (data -> ffXRRGetOutputProperty (data -> display , output , atomEdid , 0 , 100 , 0 , 0 , AnyPropertyType , NULL , NULL , & nitems , NULL , & edidData ) == Success )
215+ if (data -> ffXRRGetOutputProperty (data -> display , output , atomEdid , 0 , 100 , false, false , AnyPropertyType , & actual_type , & actual_format , & nitems , & bytes_after , & edidData ) == Success )
213216 {
214217 if (nitems >= 128 )
215218 {
@@ -228,8 +231,9 @@ static bool xrandrHandleOutput(XrandrData* data, RROutput output, FFstrbuf* name
228231static bool xrandrHandleMonitor (XrandrData * data , XRRMonitorInfo * monitorInfo )
229232{
230233 bool foundOutput = false;
231-
232- FF_STRBUF_AUTO_DESTROY name = ffStrbufCreateS (data -> ffXGetAtomName (data -> display , monitorInfo -> name ));
234+ char * xname = data -> ffXGetAtomName (data -> display , monitorInfo -> name );
235+ FF_STRBUF_AUTO_DESTROY name = ffStrbufCreateS (xname );
236+ data -> ffXFree (xname );
233237 for (int i = 0 ; i < monitorInfo -> noutput ; i ++ )
234238 {
235239 if (xrandrHandleOutput (data , monitorInfo -> outputs [i ], & name , monitorInfo -> primary ))
@@ -341,6 +345,7 @@ void ffdsConnectXrandr(FFDisplayServerResult* result)
341345
342346 FF_LIBRARY_LOAD_SYMBOL_VAR (xrandr , data , XInternAtom ,);
343347 FF_LIBRARY_LOAD_SYMBOL_VAR (xrandr , data , XGetAtomName ,);
348+ FF_LIBRARY_LOAD_SYMBOL_VAR (xrandr , data , XFree ,);
344349 FF_LIBRARY_LOAD_SYMBOL_VAR (xrandr , data , XRRGetScreenInfo ,)
345350 FF_LIBRARY_LOAD_SYMBOL_VAR (xrandr , data , XRRConfigCurrentRate ,);
346351 FF_LIBRARY_LOAD_SYMBOL_VAR (xrandr , data , XRRConfigCurrentConfiguration ,);
0 commit comments