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

Proposed by ksamak
Status: Superseded
Proposed branch: lp:~ksamak/compiz/showmouse_autostart_option
Merge into: lp:compiz/0.9.13
Diff against target: 63 lines (+24/-0)
3 files modified
plugins/showmouse/showmouse.xml.in (+5/-0)
plugins/showmouse/src/showmouse.cpp (+16/-0)
plugins/showmouse/src/showmouse.h (+3/-0)
To merge this branch: bzr merge lp:~ksamak/compiz/showmouse_autostart_option
Reviewer Review Type Date Requested Status
Sam Spilsbury Pending
Marco Trevisan (TreviƱo) Pending
Review via email: mp+315652@code.launchpad.net

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

This proposal has been superseded by a proposal from 2017-03-02.

Commit message

showmouse: added autostart option

Description of the change

added startup option to showmouse plugin

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) :
4108. By ksamak <ksamak@ksalaptop>

fix indentation

Revision history for this message
ksamak (ksamak) wrote :

hi,
fixed indentation, and commented on timer use.
thanks for your time.

4109. By ksamak <ksamak@ksalaptop>

showmouse: used Notify trick to implement startup mechanism

4110. By ksamak <ksamak@ksalaptop>

coding style

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/showmouse/showmouse.xml.in'
--- plugins/showmouse/showmouse.xml.in 2016-05-31 17:30:42 +0000
+++ plugins/showmouse/showmouse.xml.in 2017-03-02 07:54:34 +0000
@@ -19,6 +19,11 @@
19 <options>19 <options>
20 <group>20 <group>
21 <_short>General</_short>21 <_short>General</_short>
22 <option name="activate_at_startup" type="bool">
23 <_short>plugin should be active at startup</_short>
24 <_long>If active, the plugin will start active, with the mouse enhanced</_long>
25 <default>false</default>
26 </option>
22 <option name="initiate" type="key">27 <option name="initiate" type="key">
23 <_short>Initiate</_short>28 <_short>Initiate</_short>
24 <_long>Toggle the mouse pointer trail.</_long>29 <_long>Toggle the mouse pointer trail.</_long>
2530
=== modified file 'plugins/showmouse/src/showmouse.cpp'
--- plugins/showmouse/src/showmouse.cpp 2016-05-31 17:30:42 +0000
+++ plugins/showmouse/src/showmouse.cpp 2017-03-02 07:54:34 +0000
@@ -660,6 +660,17 @@
660 return true;660 return true;
661}661}
662662
663bool ShowmouseScreen::checkStartup () {
664 if (optionGetActivateAtStartup()) {
665 active = true;
666 toggleFunctions (true);
667 gScreen->glPaintOutputSetEnabled (gScreen, true);
668 }
669 timeoutHandle.stop();
670 return false;
671}
672
673
663ShowmouseScreen::ShowmouseScreen (CompScreen *screen) :674ShowmouseScreen::ShowmouseScreen (CompScreen *screen) :
664 PluginClassHandler <ShowmouseScreen, CompScreen> (screen),675 PluginClassHandler <ShowmouseScreen, CompScreen> (screen),
665 cScreen (CompositeScreen::get (screen)),676 cScreen (CompositeScreen::get (screen)),
@@ -687,6 +698,11 @@
687 this, _1, _2, _3));698 this, _1, _2, _3));
688 optionSetInitiateEdgeTerminate (boost::bind (&ShowmouseScreen::terminate,699 optionSetInitiateEdgeTerminate (boost::bind (&ShowmouseScreen::terminate,
689 this, _1, _2, _3));700 this, _1, _2, _3));
701
702
703 timeoutHandle.setTimes (1, 2);
704 timeoutHandle.setCallback (boost::bind (&ShowmouseScreen::checkStartup, this));
705 timeoutHandle.start ();
690}706}
691707
692ShowmouseScreen::~ShowmouseScreen ()708ShowmouseScreen::~ShowmouseScreen ()
693709
=== modified file 'plugins/showmouse/src/showmouse.h'
--- plugins/showmouse/src/showmouse.h 2016-05-31 17:30:42 +0000
+++ plugins/showmouse/src/showmouse.h 2017-03-02 07:54:34 +0000
@@ -138,6 +138,9 @@
138 float rot;138 float rot;
139139
140 MousePoller pollHandle;140 MousePoller pollHandle;
141 CompTimer timeoutHandle;
142
143 bool checkStartup ();
141144
142 void145 void
143 preparePaint (int);146 preparePaint (int);

Subscribers

People subscribed via source and target branches