anchor.diff:  begin
     if Assigned(OnMouseEnter) then
      OnMouseEnter(Self, ConvertShiftState(FXEvent^.xbutton.state), AMousePos)
  -  else if Assigned(Parent) then Parent.EvMouseEnter(AMousePos);
  +  else if Assigned(Parent) then TX11Window(Parent).EvMouseEnter(AMousePos);
   end;
   
   procedure TX11Window.EvMouseLeave;
   begin
     if Assigned(OnMouseLeave) then OnMouseLeave(Self)
  -  else if Assigned(Parent) then Parent.EvMouseLeave();
  +  else if Assigned(Parent) then TX11Window(Parent).EvMouseLeave();
   end;
   
   procedure TX11Window.EvMousePressed(AButton: TMouseButton;
  
positive.code: begin
    if Assigned(OnMousePressed) then
     OnMousePressed(Self, AButton, ConvertShiftState(FXEvent^.xbutton.state), AMousePos)
    else if Assigned(Parent) then Parent.EvMousePressed(AButton, AMousePos);
  end;
  
  procedure TX11Window.EvMouseReleased(AButton: TMouseButton;
  
negative.code:  if Assigned(OnMouseReleased) then
     OnMouseReleased(Self, AButton,
     ConvertShiftState(FXEvent^.xbutton.state), AMousePos)
    else if Assigned(Parent) then TX11Window(Parent).EvMouseReleased(AButton, AMousePos);
  end;
  
  procedure TX11Window.EvMouseMove(const AMousePos: TPoint);
  begin
    if Assigned(OnMouseMove) then
     OnMouseMove(Self, ConvertShiftState(FXEvent^.xbutton.state), AMousePos)
    else if Assigned(Parent) then TX11Window(Parent).EvMouseMove(AMousePos);
  end;
  
  procedure TX11Window.EvMouseWheel(AWheelDelta: Single; const AMousePos: TPoint);
  begin
    if Assigned(OnMouseWheel) then
     OnMouseWheel(Self, ConvertShiftState(FXEvent^.xbutton.state), AWheelDelta, AMousePos)
    else if Assigned(Parent) then TX11Window(Parent).EvMouseWheel(AWheelDelta, AMousePos);
  end;
  
  procedure TX11Window.EvPaint;
  