X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fopenbox.hh;h=1489ffb744b1af37301053cbf99b5a3f794529cb;hb=3c61812e588fb3c34d0713d7f82ccbf21091f032;hp=b632cecf841722c20fa284e81ac915ab448453fe;hpb=5f78b51429b204f89b654d634bb4cc8cb78b95f6;p=chaz%2Fopenbox diff --git a/src/openbox.hh b/src/openbox.hh index b632cecf..1489ffb7 100644 --- a/src/openbox.hh +++ b/src/openbox.hh @@ -87,6 +87,11 @@ private: Defaults to $(HOME)/.openbox/menu3 */ std::string _menufilepath; + //! Path to the script file to execute on startup + /*! + Defaults to $(HOME)/.openbox/user.py + */ + std::string _scriptfilepath; //! The display requested by the user, or null to use the DISPLAY env var char *_displayreq; //! The value of argv[0], i.e. how this application was executed @@ -166,9 +171,16 @@ public: //! Returns a managed screen inline OBScreen *screen(int num) { assert(num >= 0); assert(num < (signed)_screens.size()); + if (num >= screenCount()) + return NULL; return _screens[num]; } + //! Returns the number of managed screens + inline int screenCount() const { + return (signed)_screens.size(); + } + //! Returns the mouse cursors used throughout Openbox inline const Cursors &cursors() const { return _cursors; }