From 8f7966e0020729dbb141e320afd36bef245db8a8 Mon Sep 17 00:00:00 2001 From: Wizzup? Date: Wed, 23 Sep 2009 21:53:52 +0000 Subject: [PATCH] Colour picker change. git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@88 3f818213-9676-44b0-a9b4-5e4c4e03d09d --- Units/MMLAddon/colourpicker.pas | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Units/MMLAddon/colourpicker.pas b/Units/MMLAddon/colourpicker.pas index 8abb26c..a2b54f9 100644 --- a/Units/MMLAddon/colourpicker.pas +++ b/Units/MMLAddon/colourpicker.pas @@ -8,6 +8,12 @@ uses Classes, SysUtils, LCLIntf,LCLType,InterfaceBase,Forms,Controls,ExtCtrls, Graphics, Window + + {$IFNDEF PICKER_CLIENT} + {$IFDEF LINUX} + ,x + {$ENDIF} + {$ENDIF} ; type @@ -62,8 +68,22 @@ procedure TMColorPicker.Pick(Var C, X, Y: Integer); var w, h: integer; bmp: TBitmap; + + {$IFNDEF PICKER_CLIENT} + {$IFDEF LINUX} + OldWindow: TWindow; + {$ENDIF} + {$ENDIF} + begin Form := TForm.Create(Application.MainForm); + {$IFNDEF PICKER_CLIENT} + {$IFDEF LINUX} + OldWindow := Window.CurWindow; + Window.SetTarget(Window.DesktopWindow); + {$ENDIF} + {$ENDIF} + Window.GetDimensions(w, h); Form.Width := w; @@ -119,6 +139,12 @@ begin x := Colorx; y := Colory; + {$IFNDEF PICKER_CLIENT} + {$IFDEF LINUX} + Window.SetTarget(OldWindow); + {$ENDIF} + {$ENDIF} + Note.Free; Bitmap.Free; Timor.Free;