~vanvugt/compiz/fix-1066804-1066805

« back to all changes in this revision

Viewing changes to xslt/bcop.xslt

  • Committer: Tarmac
  • Author(s): Brandon Schaefer
  • Date: 2012-10-03 07:13:57 UTC
  • mfrom: (3405.3.3 compiz)
  • Revision ID: tarmac-20121003071357-vwcfhn6xyab5oohv
Added a new template that will check tap_detection. If it is false then add 
CompAction::StateTapIgnore to the actions state.

If StateTapIgnore is set then in grabUngrabManyKeys ignore grabbing all 
modifier+<keys>, because we don't care if the modifier is a tap or not.

This allows for Super+P to work with this unity branch:
https://code.launchpad.net/~brandontschaefer/unity/disable-tap-for-super/+merge/127407. Fixes: https://bugs.launchpad.net/bugs/950160. Approved by Daniel van Vugt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
475
475
</xsl:text>
476
476
        <xsl:text>    action.setState (state | CompAction::StateInitKey);
477
477
</xsl:text>
 
478
        <xsl:call-template name="initTapDetection"/>
478
479
        <xsl:if test="default/text() and default/text() != 'disabled'">
479
480
            <xsl:text>    action.keyFromString ("</xsl:text>
480
481
            <xsl:value-of select="default/text()"/>
735
736
        </xsl:if>
736
737
    </xsl:template>
737
738
 
 
739
    <xsl:template name="initTapDetection">
 
740
        <xsl:choose>
 
741
            <xsl:when test="./tap_detection/text() = 'false'">
 
742
                <xsl:text>    action.setState (action.state() | CompAction::StateIgnoreTap);
 
743
</xsl:text>
 
744
            </xsl:when>
 
745
        </xsl:choose>
 
746
    </xsl:template>
 
747
 
738
748
    <xsl:template name="initIntRestriction">
739
749
        <xsl:param name="value"/>
740
750
        <xsl:value-of select="$value"/>