Review Request 126650: [WIP] Add PM/ScreenSaver Inhibition capabilities to KIdleTime

Martin Gräßlin mgraesslin at kde.org
Wed Jan 13 11:07:30 UTC 2016



> On Jan. 11, 2016, 1:05 p.m., Martin Gräßlin wrote:
> > src/inhibition.h, line 30
> > <https://git.reviewboard.kde.org/r/126650/diff/1/?file=428572#file428572line30>
> >
> >     Maybe an explicit InhibitLockScreen?
> 
> Martin Klapetek wrote:
>     Can add. Btw. is there any dbus interface to inhibit only lockscreen? Or does it use the screensaver one?

There is no such thing as a screensaver in modern DEs (at least Plasma, GNOME Shell and Unity). For historic reasons the interface is called screensaver, so screensaver is the one for lock screen.


> On Jan. 11, 2016, 1:05 p.m., Martin Gräßlin wrote:
> > src/inhibition.h, lines 32-34
> > <https://git.reviewboard.kde.org/r/126650/diff/1/?file=428572#file428572line32>
> >
> >     Please use lock screen instead of screensaver. These things don't exist anymore ;-)
> 
> Martin Klapetek wrote:
>     xscreensaver? Also the interface is called fdo.ScreenSaver so I think it's fitting?

As far as my quick internet research showed: xscreensaver does not support dbus interface (it would have surprised me). Given that: see what I wrote above: there is no such thing as a screensaver in a modern DE. Let's use lock screen and leave the legacy behind :-)


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126650/#review90884
-----------------------------------------------------------


On Jan. 6, 2016, 8:17 a.m., Martin Klapetek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126650/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2016, 8:17 a.m.)
> 
> 
> Review request for KDE Frameworks and Kai Uwe Broulik.
> 
> 
> Repository: kidletime
> 
> 
> Description
> -------
> 
> This is a work-in-progress, but I'm putting it up for a feedback now
> as most people are gone for the day when I wake up :)
> 
> ---
> 
> After some discussion in https://git.reviewboard.kde.org/r/126627/
> and then with Kai Uwe Broulik, I've added a PM/ScreenSaver inhibition
> capabilities to KIdleItem.
> 
> We decided with Kai that we want simple stuff, encapsulated away for
> the client as much as possible. So the Inhibition class has a static
> "constructors" which make the usage as easy as follows:
> 
> KIdleTime::Inhibition::createInhibition(KIdleTime::Inhibition::InhibitScreen, QStringLiteral("Playing Movie"), mainWindow);
> 
> That call would return an Inhibition* object which has methods to set
> the inhibition type and reason and to activate/deactivate the inhibition.
> The static method above would activate() on the Inhibition right away;
> this allows a simple fire-and-forget usage. The Inhibition object can
> be parented to any other object; the inhibition will be deactivated when
> the Inhibition object is destroyed. The user can also keep the pointer
> around and call deactivate() whenever actually needed.
> 
> The inhibition itself first looks for Solid and if present, it uses the
> Solid interface. If not present, it goes for the FDO interfaces.
> 
> It comes with an autotest.
> 
> 
> Diffs
> -----
> 
>   autotests/qtest_dbus.h PRE-CREATION 
>   src/CMakeLists.txt 23e5e29 
>   autotests/inhibition_test.cpp PRE-CREATION 
>   autotests/CMakeLists.txt PRE-CREATION 
>   autotests/fakePMServer.h PRE-CREATION 
>   src/inhibition.cpp PRE-CREATION 
>   src/inhibition.h PRE-CREATION 
>   autotests/fakePMServer.cpp PRE-CREATION 
>   CMakeLists.txt ed5dc0c 
> 
> Diff: https://git.reviewboard.kde.org/r/126650/diff/
> 
> 
> Testing
> -------
> 
> Everything works as expected, plus there's an autotest.
> 
> 
> Thanks,
> 
> Martin Klapetek
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160113/af4dad4f/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list