diff --git a/shell/panelview.cpp b/shell/panelview.cpp index 45914f468..8ec7a8a64 100644 --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -567,7 +567,7 @@ void PanelView::restoreAutoHide() (containment()->status() < Plasma::Types::RequiresAttentionStatus || containment()->status() == Plasma::Types::HiddenStatus) ) - && !geometry().contains(QCursor::pos()) + && !geometry().contains(QCursor::pos(screenToFollow())) ); } @@ -734,7 +734,7 @@ bool PanelView::event(QEvent *e) //first, don't mess with position if the cursor is actually outside the view: //somebody is doing a click and drag that must not break when the cursor i outside - if (geometry().contains(QCursor::pos())) { + if (geometry().contains(QCursor::pos(screenToFollow()))) { if (!containmentContainsPosition(me->windowPos())) { auto me2 = new QMouseEvent(me->type(), positionAdjustedForContainment(me->windowPos()), diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp index 1d08cd1e6..74f6ded71 100644 --- a/shell/shellcorona.cpp +++ b/shell/shellcorona.cpp @@ -1562,8 +1562,6 @@ Plasma::Containment *ShellCorona::setContainmentTypeForScreen(int screen, const newCg.writeEntry("activityId", oldContainment->activity()); newContainment->restore(newCg); newContainment->updateConstraints(Plasma::Types::StartupCompletedConstraint); - newContainment->save(newCg); - requestConfigSync(); newContainment->flushPendingConstraintsEvents(); emit containmentAdded(newContainment); @@ -1588,6 +1586,9 @@ Plasma::Containment *ShellCorona::setContainmentTypeForScreen(int screen, const view->rootObject()->setFocus(true, Qt::MouseFocusReason); QTimer::singleShot(2500, oldContainment, &Plasma::Applet::destroy); + //Save now as we now have a screen, so lastScreen will not be -1 + newContainment->save(newCg); + requestConfigSync(); emit availableScreenRectChanged(); return newContainment;