I looked at your url https://github.com/skalogryz/Lazarus/tree/cocoa
There's lots of code there, but I'm not sure which code you're referring to.
the entire branch of Lazarus.
OR are you looking for a specific changes that would fix the issue for you?