simplify this a bit for readability's sake
svn path=/trunk/KDE/kdelibs/; revision=1038116
This commit is contained in:
parent
f9b2ad74fc
commit
a84cf857e6
@ -571,7 +571,8 @@ PopupAppletPrivate::~PopupAppletPrivate()
|
|||||||
|
|
||||||
void PopupAppletPrivate::internalTogglePopup()
|
void PopupAppletPrivate::internalTogglePopup()
|
||||||
{
|
{
|
||||||
if (!dialog) {
|
Plasma::Dialog *d = dialog.data();
|
||||||
|
if (!d) {
|
||||||
q->setFocus(Qt::ShortcutFocusReason);
|
q->setFocus(Qt::ShortcutFocusReason);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -584,14 +585,14 @@ void PopupAppletPrivate::internalTogglePopup()
|
|||||||
timer->stop();
|
timer->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dialog.data()->isVisible()) {
|
if (d->isVisible()) {
|
||||||
if (q->location() != Floating) {
|
if (q->location() != Floating) {
|
||||||
dialog.data()->animatedHide(locationToInverseDirection(q->location()));
|
d->animatedHide(locationToInverseDirection(q->location()));
|
||||||
} else {
|
} else {
|
||||||
dialog.data()->hide();
|
d->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.data()->clearFocus();
|
d->clearFocus();
|
||||||
} else {
|
} else {
|
||||||
if (q->graphicsWidget() &&
|
if (q->graphicsWidget() &&
|
||||||
q->graphicsWidget() == static_cast<Applet*>(q)->d->extender &&
|
q->graphicsWidget() == static_cast<Applet*>(q)->d->extender &&
|
||||||
@ -603,17 +604,17 @@ void PopupAppletPrivate::internalTogglePopup()
|
|||||||
ToolTipManager::self()->hide(q);
|
ToolTipManager::self()->hide(q);
|
||||||
updateDialogPosition();
|
updateDialogPosition();
|
||||||
|
|
||||||
KWindowSystem::setOnAllDesktops(dialog.data()->winId(), true);
|
KWindowSystem::setOnAllDesktops(d->winId(), true);
|
||||||
KWindowSystem::setState(dialog.data()->winId(), NET::SkipTaskbar | NET::SkipPager);
|
KWindowSystem::setState(d->winId(), NET::SkipTaskbar | NET::SkipPager);
|
||||||
|
|
||||||
if (q->location() != Floating) {
|
if (q->location() != Floating) {
|
||||||
dialog.data()->animatedShow(locationToDirection(q->location()));
|
d->animatedShow(locationToDirection(q->location()));
|
||||||
} else {
|
} else {
|
||||||
dialog.data()->show();
|
d->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(dialog.data()->windowFlags() & Qt::X11BypassWindowManagerHint)) {
|
if (!(d->windowFlags() & Qt::X11BypassWindowManagerHint)) {
|
||||||
KWindowSystem::activateWindow(dialog.data()->winId());
|
KWindowSystem::activateWindow(d->winId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user