1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-10 21:18:19 +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()) { if (mouseGrabberItem()) {
mouseGrabberItem()->ungrabMouse(); mouseGrabberItem()->ungrabMouse();
} }
setMouseGrabEnabled(true);
setMouseGrabEnabled(false);
} }
bool View::isHighestPriorityView() { bool View::isHighestPriorityView() {

View File

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