Merge lp:~ksamak/compiz/add_startup_option_to_negative into lp:compiz/0.9.13

Proposed by ksamak
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 4108
Merged at revision: 4136
Proposed branch: lp:~ksamak/compiz/add_startup_option_to_negative
Merge into: lp:compiz/0.9.13
Diff against target: 30 lines (+13/-1)
1 file modified
plugins/neg/src/neg.cpp (+13/-1)
To merge this branch: bzr merge lp:~ksamak/compiz/add_startup_option_to_negative
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
ksamak (community) Approve
Andrea Azzarone Needs Fixing
Sam Spilsbury Pending
Review via email: mp+315657@code.launchpad.net

This proposal supersedes a proposal from 2017-01-20.

Commit message

neg: added hook to react to change in ccsm, for autostart option

Description of the change

neg: added hook to react to change in ccsm, for autostart option

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) : Posted in a previous version of this proposal
review: Needs Fixing
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

> optionSetActivateAtStartupNotify (boost::bind (&NegScreen::optionChanged, this,
> _1, _2));

This is also incorrect - it will cause all windows to be toggled whenever the option is changed, not just on startup.

Revision history for this message
ksamak (ksamak) wrote : Posted in a previous version of this proposal

> > optionSetActivateAtStartupNotify (boost::bind (&NegScreen::optionChanged,
> this,
> > _1, _2));
>
> This is also incorrect - it will cause all windows to be toggled whenever the
> option is changed, not just on startup.

Yes, this is a suggestion made by 3v1n0, that when the user switches this option in ccsm, he sees a immediate reaction. This ensures the user that changes have been taken into account
This switches all windows immediately indeed. Though i can think of no case where it is irrelevant.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

You need to fix indentation...

Revision history for this message
Andrea Azzarone (azzar1) wrote :

If this is the wanted behavior change the name of the option otherwise this does not look correct to me.

review: Needs Fixing
4108. By ksamak <ksamak@ksalaptop>

fixed indent

Revision history for this message
ksamak (ksamak) wrote :

> If this is the wanted behavior change the name of the option otherwise this
> does not look correct to me.

I now fixed the indent.

The original wanted behaviour is the start-up mechanism. it has been requested by 3v1n0 that the option has an effect when ticked, to show that it's been taken into account.

If first did with a timer, but i changed it to this "workaround", and it does fulfil both these requirements.

The only interest of this is the activation of negative windows at start up, so i do not see a semantic problem with the naming, but maybe I'm missing something.

review: Approve
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Let's go with this...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/neg/src/neg.cpp'
2--- plugins/neg/src/neg.cpp 2016-11-03 09:09:57 +0000
3+++ plugins/neg/src/neg.cpp 2017-08-24 13:55:10 +0000
4@@ -427,7 +427,17 @@
5 if (NegWindow::get (w)->isNeg)
6 NegWindow::get (w)->cWindow->addDamage ();
7 }
8- default:
9+ break;
10+ case NegOptions::ActivateAtStartup:
11+ {
12+ isNeg = optionGetActivateAtStartup();
13+ foreach (CompWindow *w, screen->windows ())
14+ {
15+ NEG_WINDOW (w);
16+ nw->toggle ();
17+ }
18+ }
19+ default:
20 break;
21 }
22 }
23@@ -453,6 +463,8 @@
24 _1, _2));
25 optionSetNegDecorationsNotify (boost::bind (&NegScreen::optionChanged, this,
26 _1, _2));
27+ optionSetActivateAtStartupNotify (boost::bind (&NegScreen::optionChanged, this,
28+ _1, _2));
29
30 }
31

Subscribers

People subscribed via source and target branches