[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-frameworks-devel
Subject: Re: Review Request 127216: [KStatusNotifierItem] MinimizeRestore does not "run" over the desktop on
From: Thomas_Lübking <thomas.luebking () gmail ! com>
Date: 2016-03-04 15:51:00
Message-ID: 20160304155100.32153.53647 () mimi ! kde ! org
[Download RAW message or body]
--===============3644670753645645296==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
> On March 3, 2016, 10:16 p.m., Thomas Lübking wrote:
> > src/kstatusnotifieritem.cpp, line 934
> > <https://git.reviewboard.kde.org/r/127216/diff/2/?file=446044#file446044line934>
> >
> > append
> > associatedWidget->setAttribute(Qt::WA_Moved);
> >
> >
> >
> > This should tell Qt to demand an explicit position and skip placement by the WM \
> > (yes, this generally works in KWin ;-)
> > However, this flag should be implicitly set by ::move() unless the point is \
> > invalid, so you might want to "qDebug() << associatedWidgetPos;" to check whether \
> > it's invalid for the failing clients.
>
> Anthony Fieroni wrote:
> Fun facts :) void KStatusNotifierItemPrivate::minimizeRestore(bool) is called only \
> when you click on tray icon i.e. if i close app with big red X it's not called => i \
> can't store position :)
> Anthony Fieroni wrote:
> More fun facts :) associatedWidget->setGeometry(associatedWidget->frameGeometry()); \
> works in any case ! I will add path if you want, but you will not be happy to set \
> geometry by myself :)
> Anthony Fieroni wrote:
> ^ No, extend geometry with decoration size :)
meehhh...
That means one will have to filter QEvent::Close of associatedWidget and store the \
position from there.
- Thomas
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127216/#review93143
-----------------------------------------------------------
On Feb. 29, 2016, 5:18 a.m., Anthony Fieroni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127216/
> -----------------------------------------------------------
>
> (Updated Feb. 29, 2016, 5:18 a.m.)
>
>
> Review request for KDE Frameworks, Martin Gräßlin, Thomas Lübking, and Martin \
> Klapetek.
>
> Bugs: 356523
> https://bugs.kde.org/show_bug.cgi?id=356523
>
>
> Repository: knotifications
>
>
> Description
> -------
>
> Store position of widget before hide it
>
>
> Diffs
> -----
>
> src/kstatusnotifieritem.cpp cf3e7b5
> src/kstatusnotifieritemprivate_p.h 8fdfd4c
>
> Diff: https://git.reviewboard.kde.org/r/127216/diff/
>
>
> Testing
> -------
>
> Tested on pixel ration = 1
>
>
> Thanks,
>
> Anthony Fieroni
>
>
--===============3644670753645645296==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/127216/">https://git.reviewboard.kde.org/r/127216/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On March 3rd, 2016, 10:16 p.m. UTC, <b>Thomas \
Lübking</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/127216/diff/2/?file=446044#file446044line934" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kstatusnotifieritem.cpp</a> <span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">932</font></th> <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="n">associatedWidget</span><span class="o">-></span><span \
class="n">move</span><span class="p">(</span><span class="n">info</span><span \
class="p">.</span><span class="n">frameGeometry</span><span class="p">().</span><span \
class="n">topLeft</span><span class="p">());</span> <span class="c1">// avoid \
placement policies</span></pre></td> <th bgcolor="#e9eaa8" style="border-left: 1px \
solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">933</font></th> <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; "> <span \
class="n">associatedWidget</span><span class="o">-></span><span \
class="n">move</span><span class="p">(</span><span \
class="n">associatedWidgetPos</span><span class="p">);</span></pre></td> </tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">append associatedWidget->setAttribute(Qt::WA_Moved);</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This should tell Qt to demand an explicit position and \
skip placement by the WM (yes, this generally works in KWin ;-)</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">However, this flag should be implicitly set by ::move() unless the point is \
invalid, so you might want to "qDebug() << associatedWidgetPos;" to check \
whether it's invalid for the failing clients.</p></pre> </blockquote>
<p>On March 4th, 2016, 5:32 a.m. UTC, <b>Anthony Fieroni</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;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Fun \
facts :) void KStatusNotifierItemPrivate::minimizeRestore(bool) is called only when \
you click on tray icon i.e. if i close app with big red X it's not called => i \
can't store position :)</p></pre> </blockquote>
<p>On March 4th, 2016, 6:06 a.m. UTC, <b>Anthony Fieroni</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;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">More \
fun facts :) associatedWidget->setGeometry(associatedWidget->frameGeometry()); \
works in any case ! I will add path if you want, but you will not be happy to set \
geometry by myself :)</p></pre> </blockquote>
<p>On March 4th, 2016, 6:11 a.m. UTC, <b>Anthony Fieroni</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;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">^ No, \
extend geometry with decoration size :)</p></pre> </blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">meehhh...</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">That means one will have to filter \
QEvent::Close of associatedWidget and store the position from there.</p></pre> <br />
<p>- Thomas</p>
<br />
<p>On February 29th, 2016, 5:18 a.m. UTC, Anthony Fieroni wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for KDE Frameworks, Martin Gräßlin, Thomas Lübking, and Martin \
Klapetek.</div> <div>By Anthony Fieroni.</div>
<p style="color: grey;"><i>Updated Feb. 29, 2016, 5:18 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=356523">356523</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
knotifications
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Store position of widget before hide it</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Tested on pixel ration = 1</p></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/kstatusnotifieritem.cpp <span style="color: grey">(cf3e7b5)</span></li>
<li>src/kstatusnotifieritemprivate_p.h <span style="color: \
grey">(8fdfd4c)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/127216/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============3644670753645645296==--
[Attachment #3 (text/plain)]
_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic