X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fdisplay.hh;h=81dd27c5dffdce3dfdb92d913795cb95b8810ad5;hb=65e91ac3d6bbfec368bae9957c18c477d4f53ec5;hp=0879ce32be024109db1fdd60bbae67d301ffa951;hpb=406c79aea1b6f9c8bd1bbeb253ebc7cb97fc7e25;p=chaz%2Fopenbox diff --git a/otk/display.hh b/otk/display.hh index 0879ce32..81dd27c5 100644 --- a/otk/display.hh +++ b/otk/display.hh @@ -47,9 +47,15 @@ private: //! The value of the mask for the ScrollLock modifier unsigned int _scroll_lock_mask; + //! The key codes for the modifier keys + XModifierKeymap *_modmap; + //! The number of requested grabs on the display int _grab_count; + //! When true, X errors will be ignored. Use with care. + bool _ignore_errors; + //! A list of information for all screens on the display ScreenInfo** _screeninfo_list; @@ -57,12 +63,6 @@ private: //! screen RenderControl** _rendercontrol_list; - // Handles X errors on the display - /* - Displays the error if compiled for debugging. - */ - //int xerrorHandler(::Display *d, XErrorEvent *e); - public: //! Initializes the class, opens the X display /*! @@ -102,9 +102,15 @@ public: inline unsigned int numLockMask() const { return _num_lock_mask; } inline unsigned int scrollLockMask() const { return _scroll_lock_mask; } + const XModifierKeymap *modifierMap() const { return _modmap; } inline ::Display* operator*() const { return _display; } + //! When true, X errors will be ignored. + inline bool ignoreErrors() const { return _ignore_errors; } + //! Set whether X errors should be ignored. Use with care. + void setIgnoreErrors(bool t); + //! Grabs the display void grab(); @@ -127,6 +133,7 @@ public: bool allow_scroll_lock) const; void ungrabKey(unsigned int keycode, unsigned int modifiers, Window grab_window) const; + void ungrabAllKeys(Window grab_window) const; }; }