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: 
    if Assigned(OnKeyPressed) then
     OnKeyPressed(Self, AKey, ConvertShiftState(FXEvent^.xkey.state))
    else if Assigned(Parent) then Parent.EvKeyPressed(AKey);
  
    if (FXEvent^.xkey.state and (ControlMask or Mod1Mask)) = 0 then EndComposing;
  end;
  
negative.code: 
    if Assigned(OnKeyReleased) then
     OnKeyReleased(Self, KeySymToKeycode(KeySym), ConvertShiftState(FXEvent^.xkey.state))
    else if Assigned(Parent) then TX11Window(Parent).EvKeyReleased(AKey);
  
    // Do not call EndComposing, as this would generate duplicate KeyChar events!
  end;
  