no need to focus an applet twice
svn path=/trunk/KDE/kdelibs/; revision=905312
This commit is contained in:
parent
d282afc3ad
commit
d4bb3c790a
@ -271,7 +271,7 @@ void Applet::restore(KConfigGroup &group)
|
||||
|
||||
void AppletPrivate::setFocus()
|
||||
{
|
||||
kDebug() << "setting focus";
|
||||
//kDebug() << "setting focus";
|
||||
q->setFocus(Qt::ShortcutFocusReason);
|
||||
}
|
||||
|
||||
|
@ -1373,15 +1373,17 @@ void ContainmentPrivate::focusApplet(Plasma::Applet *applet)
|
||||
focusedApplet->removeAssociatedWidget(w);
|
||||
}
|
||||
}
|
||||
//but what if applet isn't really one of our applets?
|
||||
//FIXME should we really unfocus the old applet?
|
||||
|
||||
if (applet && applets.contains(applet)) {
|
||||
//kDebug() << "switching to" << applet->name();
|
||||
focusedApplet = applet;
|
||||
foreach (QWidget *w, widgets) {
|
||||
focusedApplet->addAssociatedWidget(w);
|
||||
}
|
||||
|
||||
if (!focusedApplet->hasFocus()) {
|
||||
focusedApplet->setFocus(Qt::ShortcutFocusReason);
|
||||
}
|
||||
} else {
|
||||
focusedApplet = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user