~kelemeng/compiz-core/bug780505

« back to all changes in this revision

Viewing changes to xslt/bcop.xslt

  • Committer: Daniel van Vugt
  • Date: 2012-02-13 08:52:30 UTC
  • mfrom: (2996.1.1 altf4)
  • Revision ID: vanvugt@gmail.com-20120213085230-j890ctb1wj946ias
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::KeyBinding::fromString no longer fails due to screen being NULL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
941
941
 
942
942
        </xsl:text>
943
943
        <xsl:value-of select="$Plugin"/>
944
 
        <xsl:text>Options ();
 
944
        <xsl:text>Options (bool init = true);
945
945
        virtual ~</xsl:text>
946
946
        <xsl:value-of select="$Plugin"/>
947
947
        <xsl:text>Options ();
948
948
 
 
949
        void initOptions ();
 
950
 
949
951
        virtual CompOption::Vector &amp; getOptions ();
950
952
        virtual bool setOption (const CompString &amp;name, CompOption::Value &amp;value);
951
953
 
1090
1092
        <xsl:value-of select="$Plugin"/>
1091
1093
        <xsl:text>Options::</xsl:text>
1092
1094
        <xsl:value-of select="$Plugin"/>
1093
 
        <xsl:text>Options () :
 
1095
        <xsl:text>Options (bool init /* = true */) :
1094
1096
    mOptions (</xsl:text>
1095
1097
        <xsl:value-of select="$Plugin"/>
1096
1098
        <xsl:text>Options::OptionNum),
1098
1100
        <xsl:value-of select="$Plugin"/>
1099
1101
        <xsl:text>Options::OptionNum)
1100
1102
{
 
1103
    if (init)
 
1104
        initOptions ();
 
1105
}
 
1106
 
 
1107
void
 
1108
</xsl:text>
 
1109
<xsl:value-of select="$Plugin"/><xsl:text>Options::initOptions ()
 
1110
{
1101
1111
</xsl:text>
1102
1112
    <xsl:if test="/compiz/plugin[@name=$pName]/descendant-or-self::option[@type = 'action'] or
1103
1113
                  /compiz/plugin[@name=$pName]/descendant-or-self::option[@type = 'key'] or