[GTK] Fix some allocation issues

Fixed the calculation of the mouse position.
Avoid negative sizes in the canvas widget.