It's useful to have a working X server if a client holds a grab when it triggers a debugger breakpoint

David Campbell david at
Mon May 25 17:00:47 PDT 2009


Many/most GUI toolkits implement pop up menus using grabs.  This can 
cause major desktop lockups when debugging GUI applications, because 
hitting breakpoints in pop up menu callback code will occur while a grab 
is active.

Reaching a breakpoint while a grab is active indefinitely locks up the X 
server, leaving a standalone desktop user the only option but to power 
down and suffer potential data loss.

Up until recently, the AllowDeactivateGrabs functionality could be 
configured such that the grabs could be deactivated with certain 
keystrokes, but this functionality has now been removed from the X 
server in the following change

Given the absence of the above functionality, where grabs are used by 
underlying GUI libraries, it is impossible to debug popup menu callback 
code where the debugger and the application are running in the same X 
server due to grab lockout.  This appears to be a critical issue.

I draw your attention to consideration of this there a way 
that the X server could be enhanced to recognise processes that have 
been suspended and automatically cancel their grabs and avoid this 
problem?  Should the AllowDeactivateGrabs functionality be restored in 
the interim while a full solution is thought through?

Others have raised these issues:

-- Dave Campbell

More information about the xorg mailing list