[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Review Request 108417: screenlocker make [escape] "conditionally" turn off the screen
From:       Thomas_Lübking <thomas.luebking () gmail ! com>
Date:       2013-01-16 19:43:26
Message-ID: 20130116194326.1504.61382 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Jan. 16, 2013, 4:07 p.m., Oliver Henshaw wrote:
> > I'm not sure about this. I do think that control of when to trigger e.g. dpms and \
> > dimming should shift from powerdevil to screenlocker (leaving the mechanism in \
> > powerdevil) but this seems a strange place to start. 
> > If this is a companion to https://git.reviewboard.kde.org/r/108375/ (but for the \
> > simple locker) then what about just dismissing the unlock dialog on Escape? This \
> > is what the old screensaver did if I read correctly. In fact, is that an approach \
> > that works for all varieties of locker?
> 
> Thomas Lübking wrote:
> The unlock dialog cannot be dismissed, it's what protects the screen against \
> content exposure - it /is/ the screenlocker by the new architecture and afaiu. The \
> "screensaver" is just fancy stuff on top of it for whoever wants that, but it's not \
> relevant in the locking mechanism. 
> I don't think dimming belongs into the locker at all (why?) and Aaron preferred to \
> keep the ability to dpms in one place and not link Xdpms from the locker/greeter. 
> As pointed out, i believe that in the long run dpms (and pot. dimming if it's not) \
> should be abstracted in solid, but for now it has to be done on the workspace layer \
> and (only) powerdevil already has it. 
> I frankly don't know what the "simple locker" configures as screensaver (no \
> screensaver, no screensaver kcm, not gonna happen ;-) but if it disables \
> m_showScreenSaver in the locker app, then yes - this is gonna just turn off your \
> screen when you press escape from the locker instead of showing some fancy \
> animation. 
> Notice that i'm a foreigner in this context - i've no idea who's in charge of \
> screenlocking / saving and just hooked on when there was this stir on k-c-d. 
> I'll hold the push back for the next 3 hours (20:30 CET) to resolve pending \
> questions. 
> Oliver Henshaw wrote:
> I've some familiarity with powerdevil but not much insight into the architecture of \
> the greeter part of the screenlocker. 
> If the screenlocker DESIGN document is still valid, then it's the fullscreen window \
> provided by the LockScreen class that obscures the desktop. The greeter goes over \
> it. The simple locker is a qml thing managed by greeterapp, the same thing that \
> launches the legacy screensaver windows - I think the simple locker is what is \
> revealed when the screenlocker is hidden. I think the Simple Locker and the plasma \
> based Desktop Widgets use the same qml password dialog. So it's this password \
> dialog that should be dismissable/hideable, leaving whatever is in the background \
> intact. 
> I believe the dialog needs to be hideable on: the Desktop Widgets locker, since \
> once you bring it up with "Leave Screen" it stays there indefinitely; the Simple \
> Locker, since it's always present and obscures the wallpaper background. If my \
> understanding in the paragraph above is correct, hiding it in the legacy \
> screensaver means hiding the whole simple locker, which is what you have done in \
> the other review. 
> Oliver Henshaw wrote:
> As for dpms, yes I agree that setting dpms modes should stay in powerdevil for now, \
> that's what I meant by "mechanism" above. I'm talking about how currently both \
> powerdevil and the screenlocker do things that affect the screen on idle - unifying \
> them in screenlocker allows things like dimming as a warning the screenlocker is \
> about to trigger (sadly this may only be feasible on laptops) or more aggressive \
> dpms-on-idle when the screen is locked. 
> I haven't put code to paper to test out these ideas, so I'm afraid I'm slightly \
> waffly when it comes to talking about shifting the balance of responsibilities \
> between powerdevil and screenlocker and what that would look like.

OK, I never touched or checked the plasma locker process.

The "simple locker" ie. kscreenlocker_greet is not hidden by the other patch, but \
instead the "legacy fancy show" (tm) is re-shown.

I tested and there is NO OTHER WINDOW protecting the screen but the declarative views \
created in greeterapp.cpp - this part of the design document is dated or the \
implementation flawed (i had not expected, because in former tests a second screen \
got exposed when added automatically; but there's no window unless i show those \
views!)

The dialog is part of the persistant kscreenlocker_greet window, the present code did \
never intend to hide that ever (but reshow the fancy show on top of it)

Dimming screen to warn about screenlocker won't work on most non-mobile devices (and \
only if there's any infrastructure for DDC in KDE at all) nor when your display os \
dimmed anyway. I'm not sure whether it's requried to warn about a screenlocker being \
about to kick in, but if it's demanded, it has to happen in a more system agnostic \
way (eg. notification etc.)

I intend to push the commits and expect you'll push the dpms fix as well for RC3 - is \
that ok for you?


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108417/#review25663
-----------------------------------------------------------


On Jan. 14, 2013, 9:12 p.m., Thomas Lübking wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108417/
> -----------------------------------------------------------
> 
> (Updated Jan. 14, 2013, 9:12 p.m.)
> 
> 
> Review request for Plasma and Dario Freddi.
> 
> 
> Description
> -------
> 
> Requires https://git.reviewboard.kde.org/r/108416/
> This calls powerdevil to turn off the display when the user presses escape, or \
> rather every second time s/he does so. 
> Afaics the powerdevil infrastructure does not allow us to query this value from the \
> DPMS Action (different from the stuff that is implemented in backend) so to check \
> whether the screen is currently active (and i actually believe, this is gonna fail \
> as well, because the state is likely reset on wakeup before we receive the event, \
> esp. for a dbus call) we'd either have to link DPMS in the locker ... or invoke a \
> cheap trick, ie. "s/conditionally/every other time/g" 
> Another way i could think off would be to add a message on the QML (like the caps \
> lock) that the screen is gonna be turned off in 10 seconds and skip that when the \
> user starts to interact (any mouse or key events) That's probably the more fair way \
> to say that we cannot otherwise reasonably handle screenstate toggling - i just \
> worry nobody actually reads such messages *shrug* 
> 
> Diffs
> -----
> 
> ksmserver/screenlocker/greeter/greeterapp.h f332bfc 
> ksmserver/screenlocker/greeter/greeterapp.cpp c8e95bd 
> 
> Diff: http://git.reviewboard.kde.org/r/108417/diff/
> 
> 
> Testing
> -------
> 
> Yes, reliably toggles the screen even after press-holding the escape key (then wait \
> for the actual screen state and then controlled toggling it) 
> 
> Thanks,
> 
> Thomas Lübking
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/108417/">http://git.reviewboard.kde.org/r/108417/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On January 16th, 2013, 4:07 p.m. UTC, <b>Oliver \
Henshaw</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">I&#39;m not sure about this. I do think that control of when to trigger \
e.g. dpms and dimming should shift from powerdevil to screenlocker (leaving the \
mechanism in powerdevil) but this seems a strange place to start.

If this is a companion to https://git.reviewboard.kde.org/r/108375/ (but for the \
simple locker) then what about just dismissing the unlock dialog on Escape? This is \
what the old screensaver did if I read correctly. In fact, is that an approach that \
works for all varieties of locker?</pre>  </blockquote>




 <p>On January 16th, 2013, 4:32 p.m. UTC, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The unlock dialog cannot \
be dismissed, it&#39;s what protects the screen against content exposure - it /is/ \
the screenlocker by the new architecture and afaiu. The &quot;screensaver&quot; is \
just fancy stuff on top of it for whoever wants that, but it&#39;s not relevant in \
the locking mechanism.

I don&#39;t think dimming belongs into the locker at all (why?) and Aaron preferred \
to keep the ability to dpms in one place and not link Xdpms from the locker/greeter.

As pointed out, i believe that in the long run dpms (and pot. dimming if it&#39;s \
not) should be abstracted in solid, but for now it has to be done on the workspace \
layer and (only) powerdevil already has it.

I frankly don&#39;t know what the &quot;simple locker&quot; configures as screensaver \
(no screensaver, no screensaver kcm, not gonna happen ;-) but if it disables \
m_showScreenSaver in the locker app, then yes - this is gonna just turn off your \
screen when you press escape from the locker instead of showing some fancy animation.

Notice that i&#39;m a foreigner in this context - i&#39;ve no idea who&#39;s in \
charge of screenlocking / saving and just hooked on when there was this stir on \
k-c-d.

I&#39;ll hold the push back for the next 3 hours (20:30 CET) to resolve pending \
questions.</pre>  </blockquote>





 <p>On January 16th, 2013, 6:52 p.m. UTC, <b>Oliver Henshaw</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I&#39;ve some \
familiarity with powerdevil but not much insight into the architecture of the greeter \
part of the screenlocker.

If the screenlocker DESIGN document is still valid, then it&#39;s the fullscreen \
window provided by the LockScreen class that obscures the desktop. The greeter goes \
over it. The simple locker is a qml thing managed by greeterapp, the same thing that \
launches the legacy screensaver windows - I think the simple locker is what is \
revealed when the screenlocker is hidden. I think the Simple Locker and the plasma \
based Desktop Widgets use the same qml password dialog. So it&#39;s this password \
dialog that should be dismissable/hideable, leaving whatever is in the background \
intact.

I believe the dialog needs to be hideable on: the Desktop Widgets locker, since once \
you bring it up with &quot;Leave Screen&quot; it stays there indefinitely; the Simple \
Locker, since it&#39;s always present and obscures the wallpaper background. If my \
understanding in the paragraph above is correct, hiding it in the legacy screensaver \
means hiding the whole simple locker, which is what you have done in the other \
review.</pre>  </blockquote>





 <p>On January 16th, 2013, 7:03 p.m. UTC, <b>Oliver Henshaw</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">As for dpms, yes I agree \
that setting dpms modes should stay in powerdevil for now, that&#39;s what I meant by \
&quot;mechanism&quot; above. I&#39;m talking about how currently both powerdevil and \
the screenlocker do things that affect the screen on idle - unifying them in \
screenlocker allows things like dimming as a warning the screenlocker is about to \
trigger (sadly this may only be feasible on laptops) or more aggressive dpms-on-idle \
when the screen is locked.

I haven&#39;t put code to paper to test out these ideas, so I&#39;m afraid I&#39;m \
slightly waffly when it comes to talking about shifting the balance of \
responsibilities between powerdevil and screenlocker and what that would look \
like.</pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">OK, I never touched or \
checked the plasma locker process.

The &quot;simple locker&quot; ie. kscreenlocker_greet is not hidden by the other \
patch, but instead the &quot;legacy fancy show&quot; (tm) is re-shown.

I tested and there is NO OTHER WINDOW protecting the screen but the declarative views \
created in greeterapp.cpp - this part of the design document is dated or the \
implementation flawed (i had not expected, because in former tests a second screen \
got exposed when added automatically; but there&#39;s no window unless i show those \
views!)

The dialog is part of the persistant kscreenlocker_greet window, the present code did \
never intend to hide that ever (but reshow the fancy show on top of it)

Dimming screen to warn about screenlocker won&#39;t work on most non-mobile devices \
(and only if there&#39;s any infrastructure for DDC in KDE at all) nor when your \
display os dimmed anyway. I&#39;m not sure whether it&#39;s requried to warn about a \
screenlocker being about to kick in, but if it&#39;s demanded, it has to happen in a \
more system agnostic way (eg. notification etc.)

I intend to push the commits and expect you&#39;ll push the dpms fix as well for RC3 \
- is that ok for you?</pre> <br />










<p>- Thomas</p>


<br />
<p>On January 14th, 2013, 9:12 p.m. UTC, Thomas Lübking wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Plasma and Dario Freddi.</div>
<div>By Thomas Lübking.</div>


<p style="color: grey;"><i>Updated Jan. 14, 2013, 9:12 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Requires https://git.reviewboard.kde.org/r/108416/ This calls powerdevil \
to turn off the display when the user presses escape, or rather every second time \
s/he does so.

Afaics the powerdevil infrastructure does not allow us to query this value from the \
DPMS Action (different from the stuff that is implemented in backend) so to check \
whether the screen is currently active (and i actually believe, this is gonna fail as \
well, because the state is likely reset on wakeup before we receive the event, esp. \
for a dbus call) we&#39;d either have to link DPMS in the locker ... or invoke a \
cheap trick, ie. &quot;s/conditionally/every other time/g&quot;

Another way i could think off would be to add a message on the QML (like the caps \
lock) that the screen is gonna be turned off in 10 seconds and skip that when the \
user starts to interact (any mouse or key events) That&#39;s probably the more fair \
way to say that we cannot otherwise reasonably handle screenstate toggling - i just \
worry nobody actually reads such messages *shrug*</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Yes, reliably toggles the screen even after press-holding the escape key \
(then wait for the actual screen state and then controlled toggling it)</pre>  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>ksmserver/screenlocker/greeter/greeterapp.h <span style="color: \
grey">(f332bfc)</span></li>

 <li>ksmserver/screenlocker/greeter/greeterapp.cpp <span style="color: \
grey">(c8e95bd)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/108417/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic