As far as I know there is no other way to identify which X11 application is holding a grab. If you want to avoid this issue you could try using Wayland where the compositor is in control of grabs unlike X11 where it is the X11 server.
As far as I know there is no other way to identify which X11 application is holding a grab. If you want to avoid this issue you could try using Wayland where the compositor is in control of grabs unlike X11 where it is the X11 server.