> On Jan. 8, 2015, 12:58 p.m., Aleix Pol Gonzalez wrote: > > daemon/powerdevilbackendinterface.cpp, line 219 > > <https://git.reviewboard.kde.org/r/121915/diff/1/?file=339090#file339090line219> > > > > emit lidClosedChanged(d->isLidClosed); > > > > ? > > > > Also you might want to check for changes in the property, so you don't > > emit too much.
setButtonPressed is generic and might be invoked in different situations, but we only want to emit lidClosedChanged when the button event is LidClosed or LidOpened, that's why the code is the way it is. I'll just add the change guards. - Daniel ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/121915/#review73478 ----------------------------------------------------------- On Jan. 8, 2015, 12:58 p.m., Daniel Vrátil wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/121915/ > ----------------------------------------------------------- > > (Updated Jan. 8, 2015, 12:58 p.m.) > > > Review request for Plasma and Solid. > > > Repository: powerdevil > > > Description > ------- > > There's no way to detect when lid has been closed other than listening to > `changed` signal org.freedesktop.UPower and then polling the Powerdevil for > new values. This patch adds a new signal to the PowerDevil interface to > notify about the change and provide new value right away. Makes it much > easier to use. > > > Diffs > ----- > > daemon/org.kde.Solid.PowerManagement.xml 53f77e5 > daemon/powerdevilbackendinterface.h 702b66b > daemon/powerdevilbackendinterface.cpp 6dd8c71 > daemon/powerdevilcore.h e255703 > daemon/powerdevilcore.cpp d51ab19 > > Diff: https://git.reviewboard.kde.org/r/121915/diff/ > > > Testing > ------- > > Tested with qdbus-monitor, signal is emitted when laptop lid is closed/opened. > > > Thanks, > > Daniel Vrátil > >
_______________________________________________ Kde-hardware-devel mailing list Kde-hardware-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-hardware-devel