gtk: fix SetWindowOrgEx - it moved to the wrong direction

git-svn-id: trunk@24163 -
This commit is contained in:
paul 2010-03-22 04:39:53 +00:00
parent c4b2012cf1
commit 073fd0771e

View File

@ -9484,14 +9484,13 @@ function TGtkWidgetSet.SetWindowOrgEx(DC : HDC; NewX, NewY : Integer;
OldPoint: PPoint) : Boolean; OldPoint: PPoint) : Boolean;
var var
DevCtx: TGtkDeviceContext absolute DC; DevCtx: TGtkDeviceContext absolute DC;
OldP: TPoint; OldP: TPoint;
begin begin
//DebugLn('[TGtkWidgetSet.SetWindowOrgEx] ',NewX,' ',NewY); //DebugLn('[TGtkWidgetSet.SetWindowOrgEx] ',NewX,' ',NewY);
GetWindowOrgEx(DC,@OldP); GetWindowOrgEx(DC, @OldP);
Result := MoveWindowOrgEx(DC,NewX-OldP.X,NewY-OldP.Y); Result := MoveWindowOrgEx(DC, -NewX - OldP.X, -NewY - OldP.Y);
if OldPoint<>nil then if OldPoint <> nil then
OldPoint^:=OldP; OldPoint^ := OldP;
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------