mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-22 09:12:19 -05:00
Several compilation fixes.
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@372 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
b2f5a9f77a
commit
f7ff95ea38
@ -234,8 +234,12 @@ procedure TMWindow.OnSetTarget(NewTarget,OldTarget : TTargetWindowMode);
|
|||||||
begin
|
begin
|
||||||
case OldTarget of
|
case OldTarget of
|
||||||
w_Window: begin
|
w_Window: begin
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
if not Self.TargetDC= Self.DesktopDC then
|
if not Self.TargetDC= Self.DesktopDC then
|
||||||
ReleaseDC(Self.TargetHandle,Self.TargetDC);
|
ReleaseDC(Self.TargetHandle,Self.TargetDC);
|
||||||
|
{$ELSE}
|
||||||
|
raise Exception.Create('Handle/DC not supported on Linux');
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
w_XWindow: Self.FreeReturnData;
|
w_XWindow: Self.FreeReturnData;
|
||||||
end;
|
end;
|
||||||
@ -295,11 +299,27 @@ var
|
|||||||
begin
|
begin
|
||||||
case Self.TargetMode of
|
case Self.TargetMode of
|
||||||
w_BMP : result := TargetBitmap <> nil;
|
w_BMP : result := TargetBitmap <> nil;
|
||||||
w_Window : result := IsWindow(self.TargetHandle);
|
w_Window :
|
||||||
|
begin
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
|
result := IsWindow(self.TargetHandle);
|
||||||
|
{$ELSE}
|
||||||
|
Raise Exception.Create('TargetValid: Linux and w_Window');
|
||||||
|
result := False;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
w_ArrayPtr : result := ArrayPtr <> nil;
|
w_ArrayPtr : result := ArrayPtr <> nil;
|
||||||
w_HDC : result := Self.TargetDC <> 0;
|
w_HDC :
|
||||||
|
begin
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
|
result := Self.TargetDC <> 0;
|
||||||
|
{$ELSE}
|
||||||
|
Raise Exception.Create('TargetValid: Linux and w_HDC');
|
||||||
|
result := False;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
w_XWindow : begin
|
w_XWindow : begin
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
old_handler := XSetErrorHandler(@MufasaXErrorHandler);
|
old_handler := XSetErrorHandler(@MufasaXErrorHandler);
|
||||||
{ There must be a better way to do this, at least with less overhead. }
|
{ There must be a better way to do this, at least with less overhead. }
|
||||||
if XGetWindowAttributes(Self.XDisplay, Self.CurWindow, @Attrib) = 0 then
|
if XGetWindowAttributes(Self.XDisplay, Self.CurWindow, @Attrib) = 0 then
|
||||||
@ -650,7 +670,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if Self.Frozen then
|
if Self.Frozen then
|
||||||
raise Exception.CreateFMT('You cannot set a target when Frozen',[]);
|
raise Exception.CreateFMT('You cannot set a target when Frozen',[]);
|
||||||
OnSetTarget(w_XWindow,Self.TargetMode)
|
OnSetTarget(w_XWindow,Self.TargetMode);
|
||||||
Self.CurWindow := XWindow;
|
Self.CurWindow := XWindow;
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
Loading…
Reference in New Issue
Block a user