]> Dogcows Code - chaz/openbox/blobdiff - src/openbox.hh
python with callbacks!
[chaz/openbox] / src / openbox.hh
index b632cecf841722c20fa284e81ac915ab448453fe..1489ffb744b1af37301053cbf99b5a3f794529cb 100644 (file)
@@ -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; }
 
This page took 0.020433 seconds and 4 git commands to generate.