Merge lp:~vanvugt/compiz-core/fix-930412 into lp:compiz-core
Proposed by
Daniel van Vugt
Status: | Merged |
---|---|
Merged at revision: | 2997 |
Proposed branch: | lp:~vanvugt/compiz-core/fix-930412 |
Merge into: | lp:compiz-core |
Diff against target: |
211 lines (+51/-54) 4 files modified
src/action.cpp (+3/-0) src/privatescreen.h (+0/-2) src/screen.cpp (+36/-50) xslt/bcop.xslt (+12/-2) |
To merge this branch: | bzr merge lp:~vanvugt/compiz-core/fix-930412 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sam Spilsbury | Approve | ||
Review via email: mp+92720@code.launchpad.net |
Commit message
Fixed: Core keybindings like Alt+F4 not being registered due to bad construct/init ordering (LP: #930412)
Description of the change
Fixed: Core keybindings like Alt+F4 not being registered due to bad construct/init ordering (LP: #930412)
Moved CoreOptions initialization to ensure that it only happens after the critical parts of PrivateScreen::init are done. This ensures ::screen and PrivateScreen::dpy are both initialized before CoreOptions, so that CompAction:
To post a comment you must log in.
177 - <xsl:text>Options (); Options: :</xsl: text>
178 + <xsl:text>Options (bool init = true);
179 virtual ~</xsl:text>
180 <xsl:value-of select="$Plugin"/>
181 <xsl:text>Options ();
182
183 + void initOptions ();
184 +
185 virtual CompOption::Vector & getOptions ();
186 virtual bool setOption (const CompString &name, CompOption::Value &value);
187
188 @@ -1090,7 +1092,7 @@
189 <xsl:value-of select="$Plugin"/>
190 <xsl:text>
191 <xsl:value-of select="$Plugin"/>
192 - <xsl:text>Options () :
193 + <xsl:text>Options (bool init /* = true */) :
I'll take this now because it does actually fix the problem, but there are three things I don't like in this approach, and after 0.9.7.0 we should seek to change
1. We are changing bcop for the sake of core's initialization order and adding a default parameter for the sake of working around it.
2. This generally goes against the RAII principles of bcop
3. We'll need to trigger a rebuild of all the plugins.
The (more invasive) way I think this should be done would be to have a separate class Keybindings who PrivateScreen inherits from first before CoreOptions. This way we can DI a Display * into Keybindings and ensure that the relevant data is initialized before CoreOption's constructor is called.
Like I say, its invasive and I'd rather see the problem fixed before release.
Please merge.