~ubuntu-branches/ubuntu/trusty/compiz/trusty

« back to all changes in this revision

Viewing changes to plugins/commands/src/commands.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2013-08-22 06:58:07 UTC
  • mto: This revision was merged to the branch mainline in revision 3352.
  • Revision ID: package-import@ubuntu.com-20130822065807-17nlzez0d30y09so
Tags: upstream-0.9.10+13.10.20130822
ImportĀ upstreamĀ versionĀ 0.9.10+13.10.20130822

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
                            CompOption::Vector& options,
38
38
                            int                 commandOption)
39
39
{
40
 
    CommandsScreen *cs;
41
 
    Window         xid;
 
40
    Window xid = CompOption::getIntOptionNamed (options, "root", 0);
42
41
 
43
 
    xid = CompOption::getIntOptionNamed (options, "root", 0);
44
42
    if (xid != screen->root ())
45
43
        return false;
46
44
 
47
 
    cs = CommandsScreen::get (screen);
 
45
    CommandsScreen *cs = CommandsScreen::get (screen);
48
46
 
49
47
    screen->runCommand (cs->mOptions[commandOption].value (). s ());
50
48
 
51
49
    return true;
52
50
}
53
51
 
54
 
 
55
52
CommandsScreen::CommandsScreen (CompScreen *s) :
56
53
    PluginClassHandler<CommandsScreen, CompScreen> (s)
57
54
{
128
125
bool
129
126
CommandsPluginVTable::init ()
130
127
{
131
 
    if (!CompPlugin::checkPluginABI ("core", CORE_ABIVERSION))
132
 
        return false;
 
128
    if (CompPlugin::checkPluginABI ("core", CORE_ABIVERSION))
 
129
        return true;
133
130
 
134
 
    return true;
 
131
    return false;
135
132
}
136