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;