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;
var
DevCtx: TGtkDeviceContext absolute DC;
OldP: TPoint;
begin
//DebugLn('[TGtkWidgetSet.SetWindowOrgEx] ',NewX,' ',NewY);
GetWindowOrgEx(DC,@OldP);
Result := MoveWindowOrgEx(DC,NewX-OldP.X,NewY-OldP.Y);
if OldPoint<>nil then
OldPoint^:=OldP;
GetWindowOrgEx(DC, @OldP);
Result := MoveWindowOrgEx(DC, -NewX - OldP.X, -NewY - OldP.Y);
if OldPoint <> nil then
OldPoint^ := OldP;
end;
{------------------------------------------------------------------------------