Forum > GTK

[Solved] GetWindowManager value is wrong

(1/1)

AlexTP:
I made small demo to see GetWindowManager result string. It gives string of 6-7 Chinese symbols here in the demo! Why? I use latin Ubuntu 20.04 x64 with Gnome.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---implementation uses gtk2int; {$R *.lfm} { TForm1 } procedure TForm1.FormCreate(Sender: TObject);begin  caption:= 'wm: '+GTK2WidgetSet.GetWindowManager;end;      
Lazarus 3.99 (rev main_3_99-33-gcb65d62758) FPC 3.2.3 x86_64-linux-gtk2

zeljko:
I've maded change of wm name yesterday in trunk, changed PWideChar to PChar ... can you check inside GetWindowManager if PWideChar need to be returned back ?

zeljko:
Juha created bug with https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/db2bca39494aed99664abf76990a26a635e8beb4 , 3 months ago, I've fixed it yesterday, also added to merge list for 3.0RC2.

AlexTP:
I used not last Lazarus! If I change PWideChar() to PChar(), then I get OK name 'gnome shell'.
Must be in .GetWindowManager:


--- Code: ---            if (typeReturned = WMAtom) and (formatReturned = 8) then
              Result := LowerCase(StrPas(PChar(Data)));

--- End code ---

zeljko:
As I sad it's fixed yesterday and merged to fixes_3_0

Navigation

[0] Message Index

Go to full version