anchor.diff:  
     if Assigned(OnKeyPressed) then
      OnKeyPressed(Self, AKey, ConvertShiftState(FXEvent^.xkey.state))
  -  else if Assigned(Parent) then Parent.EvKeyPressed(AKey);
  +  else if Assigned(Parent) then TX11Window(Parent).EvKeyPressed(AKey);
   
     if (FXEvent^.xkey.state and (ControlMask or Mod1Mask)) = 0 then EndComposing;
   end;
  
positive.code: 
    if Assigned(OnKeyReleased) then
     OnKeyReleased(Self, KeySymToKeycode(KeySym), ConvertShiftState(FXEvent^.xkey.state))
    else if Assigned(Parent) then Parent.EvKeyReleased(AKey);
  
    // Do not call EndComposing, as this would generate duplicate KeyChar events!
  end;
  
negative.code: begin
    if Assigned(OnMousePressed) then
     OnMousePressed(Self, AButton, ConvertShiftState(FXEvent^.xbutton.state), AMousePos)
    else if Assigned(Parent) then TX11Window(Parent).EvMousePressed(AButton, AMousePos);
  end;
  
  procedure TX11Window.EvMouseReleased(AButton: TMouseButton;
  