From 3723fbde4f635fdc143928c328c80b9c1355d1c3 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 16 Aug 2012 17:24:32 +0100 Subject: x11: Supported ATOMS are now actually populated. Unknowingly the NetWindow features were broken, eg: Fullscreen didn't work etc because they exit too early out of the functions due to an empty FAtomSupported[] --- src/corelib/x11/fpg_netlayer_x11.pas | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/corelib/x11') diff --git a/src/corelib/x11/fpg_netlayer_x11.pas b/src/corelib/x11/fpg_netlayer_x11.pas index 93f6622f..555133df 100644 --- a/src/corelib/x11/fpg_netlayer_x11.pas +++ b/src/corelib/x11/fpg_netlayer_x11.pas @@ -317,16 +317,19 @@ var I: Integer; ANetAtom: TNetAtomEnum; begin -// if WindowGetPropertyAtom(FRootWindow, FNetAtoms[naSUPPORTED], AtomCount, Atoms) = False then -// Exit; + if WindowGetPropertyAtom(FRootWindow, FNetAtoms[naSUPPORTED], AtomCount, Atoms) = False then + Exit; - WriteLn('RootWindow Atom Count = ',AtomCount); +// WriteLn('RootWindow Atom Count = ',AtomCount); FillChar(FAtomSupported, SizeOf(Boolean) * Length(FAtomSupported), 0);; - for I := 0 to AtomCount-1 do begin - for ANetAtom := Low(TNetAtomEnum) to High(TNetAtomEnum) do begin - if Atoms[I] = FNetAtoms[ANetAtom] then begin + for I := 0 to AtomCount-1 do + begin + for ANetAtom := Low(TNetAtomEnum) to High(TNetAtomEnum) do + begin + if Atoms[I] = FNetAtoms[ANetAtom] then + begin FAtomSupported[ANetAtom] := True; - //WriteLn('Found ', NetAtomStr[NetAtom]); +// WriteLn('Found ', NetAtomStr[ANetAtom]); end; end; end; @@ -1111,7 +1114,7 @@ begin FDisplay := ADisplay; FRootWindow := XDefaultRootWindow(FDisplay); InitNetAtoms; -// UpdateSupportedAtoms; + UpdateSupportedAtoms; end; destructor TNETWindowLayer.Destroy; -- cgit v1.2.3-70-g09d2