]> Dogcows Code - chaz/openbox/blobdiff - src/openbox.hh
speed up workspace switching by causing the minimal number of expose events (none...
[chaz/openbox] / src / openbox.hh
index 77b39ce5fb3d57db2e250cc47a8888457d54369d..460caa0cee00c09d5353fecb35800caf9517309c 100644 (file)
@@ -94,12 +94,17 @@ private:
   bool _sync;
   //! Should Openbox run on a single screen or on all available screens?
   bool _single;
+  //! Optimize for a remote/low-bandwidth connection to the display?
+  bool _remote;
 
   //! A list of all managed clients
   ClientMap _clients;
 
   //! A list of all the managed screens
   ScreenList _screens;
+
+  //! The number of managed screens
+  int _managed_count;
   
   //! The action interface through which all user-available actions occur
   Actions *_actions;
@@ -173,10 +178,22 @@ public:
   */
   inline Screen *screen(int num) {
     assert(num >= 0); assert(num < (signed)ScreenCount(**otk::display));
-    if (num >= (signed)_screens.size()) return 0;
+    if (num < 0 || num >= (signed)_screens.size()) return 0;
     return _screens[num];
   }
 
+  inline int managedScreenCount() const { return _managed_count; }
+
+  inline Screen *managedScreen(int num) {
+    assert(num >= 0); assert(num < _managed_count);
+    if (num < 0 || num >= _managed_count) return 0;
+    ScreenList::iterator it, end = _screens.end();
+    int i = -1;
+    for (it = _screens.begin(); it != end; ++it)
+      if (*it && ++i == num)
+        return *it;
+  }
+
   //! Returns the mouse cursors used throughout Openbox
   inline const Cursors &cursors() const { return _cursors; }
 
This page took 0.021608 seconds and 4 git commands to generate.