<br><br><div class="gmail_quote">2010/3/19 Rob Hasselbaum <span dir="ltr">&lt;<a href="mailto:rob@hasselbaum.net">rob@hasselbaum.net</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On Thu, Mar 18, 2010 at 1:23 PM, Rob Hasselbaum &lt;<a href="mailto:rob@hasselbaum.net">rob@hasselbaum.net</a>&gt; wrote:<br>
&gt; On Thu, Mar 18, 2010 at 10:56 AM, Sebastian Kügler &lt;<a href="mailto:sebas@kde.org">sebas@kde.org</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; You can, because you can find out if it&#39;s on the desktop by calling formFactor().<br>
&gt;&gt;<br>
&gt;<br>
&gt; Ahh, OK, so if the form factor is either Horizontal or Vertical, it&#39;s guaranteed that the applet is a panel icon?<br>
<br>
</div></div>Here is the code I ended up with. Seems to work:<br>
<br>
bool MyApplet::isOpen() const {<br>
    if (formFactor() == Plasma::Horizontal || formFactor() ==<br>
Plasma::Vertical) {<br>
        return isPopupShowing();<br>
    } else {<br>
        return true;<br>
    }<br>
}<br>
<br>
Any chance of getting this (or something like it) added to the<br>
PopupApplet API? Seems generally useful, since it gives applets an<br>
opportunity to reduce their resource footprint when they&#39;re not<br>
displayed.<br>
<div><div></div><div class="h5">_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
</div></div></blockquote></div><br>IIRC applets inside a panel are not reduced to icon if the panel is enough big to host their &quot;open-status&quot;. Please correct me if I&#39;m wrong.<br clear="all"><br>-- <br>Alessandro Diaferia<br>
KDE Developer<br>KDE e.V. member<br><br>