MappingNotify event freezes drawing windows in Gnome for ~100ms
Whenever a MappingNotify event is fired, all windows stop drawing for a short while. During this time the mouse cursor remains active and visible, and can even switch between different icons (cursor, arrow, etc.). Firing the event multiple times in a row compounds the amount of time the system looks frozen. Typically this happens when you have two connected keyboards and press keys first on one, then the other.
As far as I know this only happens in the x.org version of Gnome Shell, but because I use nvidia proprietary drivers I'm bound to x.org.
This issue does not exist in other window managers, such as i3-wm.
An easy way to reproduce this is to start a video in one window and then type the following command
watch -n 0.1 'xdotool key space'
and then pressing any other key or series of keys in another window
I couldn't find a way to send MappingNotify events through the terminal, so I'm not sure if this is causal or just correlated.
I couldn't find any way to log whatever it is that's causing the issue.
I'm also not sure if this is a gnome-shell issue, a mutter issue or anywhere else located in the gnome stack. I'm using gnome-shell v 3.34.1 and mutter 3.34.1, but this issue has existed in Gnome for at least 3 years