summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2010-12-06 21:18:53 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2010-12-06 21:18:53 +0800
commitb81ec866e1b0c20dcd77c442141aed9f4ea14cf3 (patch)
treeccfd9ed291bc4ec98f988b1c4ddb62f425723297 /include
parent51e01727d309f39e3f42ecf6b53b4ebb31a385dc (diff)
downloadmobileperf-b81ec866e1b0c20dcd77c442141aed9f4ea14cf3.tar.gz
mobileperf-b81ec866e1b0c20dcd77c442141aed9f4ea14cf3.tar.bz2
Fix startup order.
Previously we were doing something like this: init -> screen init -> init core plugin screen -> create windows -> eventLoop -> updatePlugins -> initPlugin (initScreen (initWindow))). This order has a number of problems with it - namely that config plugins will be loaded on one full pass of the event loop and then core options are initialized, before which we were doing certain startup procedures on the default options, which resulted in strange race condition bugs. Also, if we are compositing we have a brief (visible) switch from 2D mode to 3D mode - in reality we want to be in 3D mode ASAP. The new order is init -> updatePlugins (load plugins specified on command line) -> screen init -> load command line plugins -> update plugins (load new plugins specified by config plugins on the command line) -> init screens -> create window (init plugins for window) -> eventLoop. This means that it takes longer for us to get to the event loop, but at least we can zip through the initialization phase quite quickly
Diffstat (limited to 'include')
-rw-r--r--include/core/screen.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/core/screen.h b/include/core/screen.h
index 1e525b5..c5bfc4c 100644
--- a/include/core/screen.h
+++ b/include/core/screen.h
@@ -39,6 +39,8 @@
class CompScreen;
class PrivateScreen;
+class CompManager;
+
typedef std::list<CompWindow *> CompWindowList;
typedef std::vector<CompWindow *> CompWindowVector;
@@ -398,6 +400,7 @@ class CompScreen :
friend class CompWindow;
friend class PrivateWindow;
friend class ModifierHandler;
+ friend class CompManager;
private:
PrivateScreen *priv;