server/grab: add check for the right device being sync'd
server/grab: add check for the right device being sync'd

Bug in the server always treats the first parameter as pointer mode instead
of whatever actual device is being grabbed.

Signed-off-by: Peter Hutterer <b9c50af7afa7642f6f854434cda9ffe54ece8b85@who-t.net>

freedesktop-unofficial-mirror/xorg__test__xorg-integration-tests,freedesktop-unofficial-mirror/xorg__test__xorg-integration-tests,freedesktop-unofficial-mirror/xorg__test__xorg-integration-tests