1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-23 13:33:50 +03:00

send QEvent::Leave for view when dragging started

--this way the applets in the view will be informed for
mouse exited the view window
This commit is contained in:
Michail Vourlakos 2019-08-26 00:15:36 +03:00
parent bc94001cc8
commit 057edb87f1
2 changed files with 6 additions and 2 deletions

View File

@ -1292,6 +1292,9 @@ void View::restoreGrabItemBehavior()
if (mouseGrabberItem()) {
mouseGrabberItem()->ungrabMouse();
}
setMouseGrabEnabled(true);
setMouseGrabEnabled(false);
}
bool View::isHighestPriorityView() {

View File

@ -528,8 +528,9 @@ void VisibilityManager::applyActivitiesToHiddenWindows(const QStringList &activi
void VisibilityManager::activeWindowDraggingStarted()
{
setContainsMouse(false);
updateHiddenState();
//! Send a fake QEvent::LEAVE to inform applets for mouse leaving the view
QHoverEvent e(QEvent::Leave, QPoint(-5,-5), m_latteView->geometry().center());
QCoreApplication::instance()->sendEvent(m_latteView, &e);
}
void VisibilityManager::dodgeActive()