The item's visible property is independent of the window visibility, which can be checked using Window.visible.
Details
- Reviewers
mart - Group Reviewers
Plasma - Commits
- R242:b257029afc3b: [Dialog] Don't alter mainItem's visibility
Needs D17542 to fix tooltips
Other than that, kickoff, systray, panelcontroller, notification popups, task manager group dialogs, visibility of pager depending on panelcontroller opening, still works.
dialogqmltest and dialogstatetest still pass, dialognativetest is broken before and after
Notifications no longer get bogus containsMouse and properly times out:
When you closed notification popup by clicking the X button inside the popup, and the popup shows again later, because we manually set visible to true, QQuickMouseArea enters the following code
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); }
QGuiApplicationPrivate::lastCursorPosition is only updated when a plasmashell 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.
isUnderMouse() basically checks contains(QGuiApplicationPrivate::lastCursorPosition).
If we don't mess with visibility, none of this happens.
Diff Detail
- Repository
- R242 Plasma Framework (Library)
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.