Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 6, 2008, 3:30:26 PM (17 years ago)
Author:
rgrieder
Message:
  • trying to make the signalhandler do certain things..
Location:
code/branches/input/src/core
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/input/src/core/CorePrereqs.h

    r1219 r1238  
    144144
    145145  // input
     146  //class GUIInputHandler;
    146147  class InputBuffer;
    147148  class InputBufferListener;
    148149  class InputManager;
     150  class JoyStickHandler;
     151  class JoyStickState;
    149152  class KeyBinder;
    150   class GUIInputHandler;
     153  class KeyEvent;
    151154  class KeyHandler;
    152155  class MouseHandler;
    153   class JoyStickHandler;
     156  class MouseState;
    154157
    155158}
  • code/branches/input/src/core/InputInterfaces.h

    r1237 r1238  
    219219  }
    220220
    221   class _CoreExport KeyboardState
    222   {
    223   public:
    224   };
    225 
    226221  struct _CoreExport Key
    227222  {
  • code/branches/input/src/core/SignalHandler.cc

    r1062 r1238  
    3535
    3636#include <assert.h>
     37#include <iostream>
    3738
    3839#include "Debug.h"
     
    5859  this->fileName = fileName;
    5960
     61  // prepare for restoring XAutoKeyRepeat
     62        if (display_ = XOpenDisplay(0))
     63  {
     64                XGetKeyboardControl( display_, &bXAutoKeyRepeatOn_ );
     65                XCloseDisplay(display_);
     66  }
     67  else
     68  {
     69    std::cout << "Warning: couldn't open X display to restore XAutoKeyRepeat." << std::endl;
     70    XAutoKeyRepeatOn_ = false;
     71  }
     72
     73
    6074  // make sure doCatch is only called once without calling dontCatch
    6175  assert( sigRecList.size() == 0 );
     
    120134      sigName = "SIGILL";
    121135      break;
     136  }
     137
     138  if (XAutoKeyRepeatOn_)
     139  {
     140    std::cout << "Trying to restore XAutoKeyRepeat" << std::endl;
     141          if (display_ = XOpenDisplay(0))
     142    {
     143                        XAutoRepeatOn(display_);
     144                  XCloseDisplay(display_);
     145    }
    122146  }
    123147
  • code/branches/input/src/core/SignalHandler.h

    r1062 r1238  
    4444#ifndef __WIN32__
    4545#include <signal.h>
     46#include <X11/Xlib.h>
    4647
    4748struct SignalRec
     
    8687    std::string appName;
    8788    std::string fileName;
     89
     90    // X Display, used to turn on KeyAutoRepeat if OIS crashes
     91                Display *display_;
     92    bool bXAutoKeyRepeatOn_;
    8893};
    8994
Note: See TracChangeset for help on using the changeset viewer.