diff --git a/Units/MMLCore/window.pas b/Units/MMLCore/window.pas index cc75f70..c77627c 100644 --- a/Units/MMLCore/window.pas +++ b/Units/MMLCore/window.pas @@ -188,7 +188,7 @@ begin case Window.TargetMode of w_BMP, w_Window, w_HDC: {$IFDEF WINDOWS} - Self.SetTarget(Window.TargetDC, Window.TargetMode); + Self.SetTarget(Window.TargetHandle, Window.TargetMode); {$ELSE} writeln('TMWindow.SetWindow - HDC not supported'); {$ENDIF} diff --git a/Units/MMLCore/windowutil.pas b/Units/MMLCore/windowutil.pas index 6da3f8a..378ed56 100644 --- a/Units/MMLCore/windowutil.pas +++ b/Units/MMLCore/windowutil.pas @@ -17,6 +17,7 @@ uses {$IFDEF LINUX} Procedure XImageToRawImage(XImg: PXImage; Var RawImage: TRawImage); function MufasaXErrorHandler(para1:PDisplay; para2:PXErrorEvent):cint;cdecl; + function MouseWindow: x.TWindow; {$ENDIF} Procedure ArrDataToRawImage(Ptr: PRGB32; Size: TPoint; Var RawImage: TRawImage); @@ -129,5 +130,15 @@ Begin End; +function MouseWindow: x.TWindow; +var + Old_Handler: TXErrorHandler; +begin + Old_Handler := XSetErrorHandler(@MufasaXErrorHandler); + + + XSetErrorHandler(Old_Handler); +end; + end.