function TSearchForm.MoveNoteWindowHere(WTitle : string) : boolean;
var
AProcess: TProcess;
List : TStringList = nil;
begin
Result := False;
{$IFDEF LINUX}
AProcess := TProcess.Create(nil);
AProcess.Executable:= 'wmctrl';
AProcess.Parameters.Add('-R' + WTitle);
AProcess.Options := AProcess.Options + [poWaitOnExit, poUsePipes];
try
AProcess.Execute;
Result := (AProcess.ExitStatus = 0); // says at least one packet got back
except on
E: EProcess do debugln('Could not move ' + WTitle);
end;
if not Result then
debugln('wmctrl error trying to move ' + WTitle);
List := TStringList.Create;
List.LoadFromStream(AProcess.Output); // just to clear it away.
List.Free;
AProcess.Free;
{$endif}
end;