KRunner: Set location before showing

Make sure the location is set before showing the window to ensure
the first appearance is animated correctly, too.

BUG: 447096
wilder-5.26
Kai Uwe Broulik 4 years ago
parent 366a5b2dec
commit 5bc7efd0d9
  1. 4
      krunner/view.cpp

@ -265,16 +265,14 @@ void View::positionOnScreen()
y = qBound(r.top(), y, r.bottom() - height()); y = qBound(r.top(), y, r.bottom() - height());
setPosition(x, y); setPosition(x, y);
setLocation(m_floating ? Plasma::Types::Floating : Plasma::Types::TopEdge);
PlasmaQuick::Dialog::setVisible(true); PlasmaQuick::Dialog::setVisible(true);
if (m_floating) { if (m_floating) {
KWindowSystem::setOnDesktop(winId(), KWindowSystem::currentDesktop()); KWindowSystem::setOnDesktop(winId(), KWindowSystem::currentDesktop());
KWindowSystem::setType(winId(), NET::Normal); KWindowSystem::setType(winId(), NET::Normal);
// Turn the sliding effect off
setLocation(Plasma::Types::Floating);
} else { } else {
KWindowSystem::setOnAllDesktops(winId(), true); KWindowSystem::setOnAllDesktops(winId(), true);
setLocation(Plasma::Types::TopEdge);
} }
KWindowSystem::forceActiveWindow(winId()); KWindowSystem::forceActiveWindow(winId());

Loading…
Cancel
Save