Improved x11 window behaviour
Fixed GCC warnings