When you want to debug OD code with gdb , by say setting trap, breakpoint or even starting the execution with the spell " step " you might get stuck with mouse coursor not being "released from the OD's window". That is, you might not be able to get the X -cursor working until you kill -9 gdb from separte console.
OLN gave that Ogre forum link, setting the AllowDeactivateGrabs option in your X server config : http://www.ogre3d.org/forums/viewtopic.php?t=20690
UPDATE: THIS does not seem to work on Xorg server version 1.10 . ( as claimed on Xorg freenode's channel it's disabled for that version).
Instead I try the following :
0. Switch to text console via alt ctl f1-9 ( important that cannot be an runnig instance of Xorg terminal ) In here Osuse its 12.1
1. Start the second separate server by cmd 'startx -- :1' . That defines DISPLAY:1 as well
2. Switch back to DISPLAY:0 CTL F6-7 :P
3. START OD.
4. Switch back to DISPLAY:1 and start gdb ./Opendungeons.bin <OD_PID>
Find the pid with 'ps aux' and ' grep ' of course.