The source project of this merge request has been removed.
Conditionally add back ungrab call for FreeBSD.
Multiple users have reported keys not working properly in XFCE after the removal of this line.
On FreeBSD no console switching pauses or other ill effects have been observed with this code line present.
Please note that the FreeBSD vty console driver (and most of the FreeBSD kernel) is completely different than the linux one, so it is possible the issue does not affect it.