<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="https://git.reviewboard.kde.org/r/117606/">https://git.reviewboard.kde.org/r/117606/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On April 17th, 2014, 11:30 a.m. UTC, <b>Marco Martin</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;">If it's for the panel, it shouldn't be done in AppletQuickItem.
also using AcceptingInputStatus seems a tad arbitrary?</pre>
 </blockquote>




 <p>On April 17th, 2014, 11:45 a.m. UTC, <b>Aleix Pol Gonzalez</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 don't think it's arbitrary, having an expanded plasmoid requires input (or interaction), at least to close it.

Also if it shouldn't be in AppletQuickItem, where should it go? Applet?</pre>
 </blockquote>





 <p>On April 22nd, 2014, 5:43 p.m. UTC, <b>Aleix Pol Gonzalez</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;">Marco?</pre>
 </blockquote>





 <p>On April 22nd, 2014, 6:11 p.m. UTC, <b>Marco Martin</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;">hmm, AcceptingInputStatus was intended at the beginning for keyboard input (to force the panel to accept focus in cases of textboxes inside the panel)
so would make so that if an applet is always expanded it can only be acceptinginput, and a panel with a taskbar would always accept focus.

</pre>
 </blockquote>





 <p>On April 22nd, 2014, 6:17 p.m. UTC, <b>Aleix Pol Gonzalez</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;">So what's your suggestion?
Should we move the expanded property to Plasma::Applet, so panel can take it into account?</pre>
 </blockquote>





 <p>On April 22nd, 2014, 6:21 p.m. UTC, <b>Marco Martin</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;">since there is not real distinction between an applet that is always expanded and an applet in a popup that is open, i think it should be in the qml part that has actually the Dialog of the popupapplets that does a plasmoid.setStatus (and restoring the old one)
(that is plasma-desktop/desktoppackage/contents/applet/Compactapplet.qml)</pre>
 </blockquote>





 <p>On April 22nd, 2014, 6:24 p.m. UTC, <b>Aleix Pol Gonzalez</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;">So we want another status that is not AcceptingInput but also makes the panel to be shown?</pre>
 </blockquote>





 <p>On April 22nd, 2014, 6:29 p.m. UTC, <b>Marco Martin</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;">NeedsAttentionStatus or even ActiveStatus should be fine
in that enum, the bigger is the value, the more "serious" is the requesting attention level</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;">I think this should be ~ok
--- a/desktoppackage/contents/applet/CompactApplet.qml
+++ b/desktoppackage/contents/applet/CompactApplet.qml
@@ -112,6 +112,8 @@ PlasmaCore.ToolTipArea {
         location: plasmoid.location
         hideOnWindowDeactivate: plasmoid.hideOnWindowDeactivate
 
+        property int oldStatus: 0
+
         mainItem: Item {
             id: appletParent
             Layout.minimumWidth: (fullRepresentation && fullRepresentation.Layout) ? fullRepresentation.Layout.minimumWidth : 0
@@ -122,8 +124,13 @@ PlasmaCore.ToolTipArea {
 
         onVisibleChanged: {
             if (!visible) {
-                plasmoid.expanded = false
+                plasmoid.expanded = false;
+                if (oldStatus > 0) {
+                    plasmoid.status = oldStatus;
+                }
             } else {
+                oldStatus = plasmoid.status;
+                plasmoid.status = PlasmaCore.Types.RequestingAttention;
                 // This call currently fails and complains at runtime:
                 // QWindow::setWindowState: QWindow::setWindowState does not accept Qt::WindowActive
                 popupWindow.requestActivate();
</pre>
<br />










<p>- Marco</p>


<br />
<p>On April 17th, 2014, 11:45 a.m. UTC, Aleix Pol Gonzalez wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://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.</div>
<div>By Aleix Pol Gonzalez.</div>


<p style="color: grey;"><i>Updated April 17, 2014, 11:45 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-framework
</div>


<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;">This patch makes sure that the panel containing a plasmoid won't hide when the plasmoid display is open.

To do so, it sets a AcceptingInputState while caching the last state, to restore it when the plasmoid is contracted back.</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;">Manual testing.</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>src/plasmaquick/appletquickitem.cpp <span style="color: grey">(fbdc88d)</span></li>

 <li>src/plasmaquick/private/appletquickitem_p.h <span style="color: grey">(784899a)</span></li>

</ul>

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







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








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