Changeset 2753
- Timestamp:
- Mar 6, 2009, 7:02:07 PM (16 years ago)
- Location:
- code/trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/util/SignalHandler.cc
r2731 r2753 53 53 namespace orxonox 54 54 { 55 bool SignalHandler::bXAutoKeyRepeatOn_ = false;56 57 55 /** 58 56 * register signal handlers for SIGSEGV and SIGABRT … … 65 63 this->filename = filename; 66 64 67 // prepare for restoring XAutoKeyRepeat68 Display* display;69 if ((display = XOpenDisplay(0)))70 {71 XKeyboardState oldState;72 XGetKeyboardControl(display, &oldState);73 if (oldState.global_auto_repeat == AutoRepeatModeOn)74 bXAutoKeyRepeatOn_ = true;75 else76 bXAutoKeyRepeatOn_ = false;77 XCloseDisplay(display);78 }79 else80 {81 std::cout << "Warning: couldn't open X display to restore XAutoKeyRepeat." << std::endl;82 bXAutoKeyRepeatOn_ = false;83 }84 85 86 65 // make sure doCatch is only called once without calling dontCatch 87 66 assert( sigRecList.size() == 0 ); … … 146 125 sigName = "SIGILL"; 147 126 break; 148 }149 150 if (bXAutoKeyRepeatOn_)151 {152 std::cout << "Trying to restore XAutoKeyRepeat" << std::endl;153 Display* display;154 if ((display = XOpenDisplay(0)))155 {156 XAutoRepeatOn(display);157 XCloseDisplay(display);158 }159 127 } 160 128 … … 326 294 bt.insert(0, timeString); 327 295 328 FILE * f = fopen( getInstance().filename.c_str(), " a" );296 FILE * f = fopen( getInstance().filename.c_str(), "w" ); 329 297 330 298 if ( !f ) -
code/trunk/src/util/SignalHandler.h
r2710 r2753 91 91 std::string appName; 92 92 std::string filename; 93 94 // used to turn on KeyAutoRepeat if OIS crashes95 static bool bXAutoKeyRepeatOn_;96 93 }; 97 94 }
Note: See TracChangeset
for help on using the changeset viewer.