It seems like it's a bug with pen tablets with LÖVE and Linux. When mouse is set to relative mode, my tablet looses all ability to send mouse inputs.