Modifications to works in linux OS

This is the PR with my modifications,  I have to add some includes, and there is a "workaround" for now to test but it must be solved. I added the code in  mousePressed but maybe we can add an ifdefine TARGET_LINUX, What do you think?