<table><tr><td style="">broulik created this revision.<br />broulik added reviewers: Plasma, mart.<br />Herald added a project: Frameworks.<br />Herald added a subscriber: kde-frameworks-devel.<br />broulik requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D17543">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The item's <tt style="background: #ebebeb; font-size: 13px;">visible</tt> property is independent of the window visibility, which can be checked using <tt style="background: #ebebeb; font-size: 13px;">Window.visible</tt>.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Needs <a href="https://phabricator.kde.org/D17542" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D17542</a> to fix tooltips<br />
Other than that, kickoff, systray, panelcontroller, notification popups, task manager group dialogs, visibility of pager depending on panelcontroller opening, still works.<br />
dialogqmltest and dialogstatetest still pass, dialognativetest is broken before and after</p>
<p>Notifications no longer get bogus <tt style="background: #ebebeb; font-size: 13px;">containsMouse</tt> and properly times out:<br />
When you closed notification popup by clicking the X button inside the popup, and the popup shows again later, because we manually set <tt style="background: #ebebeb; font-size: 13px;">visible</tt> to <tt style="background: #ebebeb; font-size: 13px;">true</tt>, <tt style="background: #ebebeb; font-size: 13px;">QQuickMouseArea</tt> enters the following code</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">case ItemVisibleHasChanged:
if (acceptHoverEvents() && d->hovered != (isVisible() && isUnderMouse())) {
if (!d->hovered) {
QPointF cursorPos = QGuiApplicationPrivate::lastCursorPosition;
d->lastScenePos = d->window->mapFromGlobal(cursorPos.toPoint());
d->lastPos = mapFromScene(d->lastScenePos);
}
setHovered(!d->hovered);
}</pre></div>
<p><tt style="background: #ebebeb; font-size: 13px;">QGuiApplicationPrivate::lastCursorPosition</tt> is only updated when a <tt style="background: #ebebeb; font-size: 13px;">plasmashell</tt> window is hovered, which is usually not the case when you just dismissed a notification popup ontop of another application. Hence, the position is incorrect and opening the dialog again causes it to think it's hovered.<br />
<tt style="background: #ebebeb; font-size: 13px;">isUnderMouse()</tt> basically checks <tt style="background: #ebebeb; font-size: 13px;">contains(QGuiApplicationPrivate::lastCursorPosition)</tt>.<br />
If we don't mess with visibility, none of this happens.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R242 Plasma Framework (Library)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D17543">https://phabricator.kde.org/D17543</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/plasmaquick/dialog.cpp</div></div></div><br /><div><strong>To: </strong>broulik, Plasma, mart<br /><strong>Cc: </strong>kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>