From 79505f7c4d1b5b23ca070e61ef0d34e36232fa78 Mon Sep 17 00:00:00 2001 From: Wizzup? Date: Wed, 23 Sep 2009 04:09:52 +0000 Subject: [PATCH] Changes. git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@84 3f818213-9676-44b0-a9b4-5e4c4e03d09d --- Units/MMLCore/window.pas | 2 +- Units/MMLCore/windowutil.pas | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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.