delay showing popups until the next processing of events
allows things like hidden panels to show before calculating where to show the popup BUG:288999
This commit is contained in:
parent
645439c299
commit
1b2d92c085
@ -600,6 +600,9 @@ void PopupApplet::timerEvent(QTimerEvent *event)
|
||||
d->autohideTimer->stop();
|
||||
}
|
||||
}
|
||||
} else if (event->timerId() == d->showDialogTimer.timerId()) {
|
||||
d->showDialogTimer.stop();
|
||||
d->showDialog();
|
||||
} else {
|
||||
Applet::timerEvent(event);
|
||||
}
|
||||
@ -607,6 +610,7 @@ void PopupApplet::timerEvent(QTimerEvent *event)
|
||||
|
||||
void PopupApplet::hidePopup()
|
||||
{
|
||||
d->showDialogTimer.stop();
|
||||
d->delayedShowTimer.stop();
|
||||
|
||||
Dialog *dialog = d->dialogPtr.data();
|
||||
@ -748,6 +752,17 @@ void PopupAppletPrivate::internalTogglePopup(bool fromActivatedSignal)
|
||||
}
|
||||
|
||||
ToolTipManager::self()->hide(q);
|
||||
showDialogTimer.start(0, q);
|
||||
}
|
||||
}
|
||||
|
||||
void PopupAppletPrivate::showDialog()
|
||||
{
|
||||
Plasma::Dialog *dialog = dialogPtr.data();
|
||||
if (!dialog) {
|
||||
return;
|
||||
}
|
||||
|
||||
updateDialogPosition();
|
||||
|
||||
KWindowSystem::setOnAllDesktops(dialog->winId(), true);
|
||||
@ -766,7 +781,6 @@ void PopupAppletPrivate::internalTogglePopup(bool fromActivatedSignal)
|
||||
if (!(dialog->windowFlags() & Qt::X11BypassWindowManagerHint)) {
|
||||
KWindowSystem::activateWindow(dialog->winId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PopupAppletPrivate::hideTimedPopup()
|
||||
|
@ -107,6 +107,7 @@ void PlasmoidPackage::createNewWidgetBrowser(QWidget *parent)
|
||||
KNS3::DownloadDialog *knsDialog = m_knsDialog.data();
|
||||
if (!knsDialog) {
|
||||
m_knsDialog = knsDialog = new KNS3::DownloadDialog("plasmoids.knsrc", parent);
|
||||
knsDialog->setProperty("DoNotCloseController", true);
|
||||
connect(knsDialog, SIGNAL(accepted()), this, SIGNAL(newWidgetBrowserFinished()));
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ public:
|
||||
|
||||
void iconSizeChanged(int group);
|
||||
void internalTogglePopup(bool fromActivatedSignal = false);
|
||||
void showDialog();
|
||||
void hideTimedPopup();
|
||||
void clearPopupLostFocus();
|
||||
void dialogSizeChanged();
|
||||
@ -61,6 +62,7 @@ public:
|
||||
Plasma::AspectRatioMode savedAspectRatio;
|
||||
QTimer *autohideTimer;
|
||||
QBasicTimer delayedShowTimer;
|
||||
QBasicTimer showDialogTimer;
|
||||
QPoint clicked;
|
||||
ItemStatus preShowStatus;
|
||||
bool popupLostFocus : 1;
|
||||
|
Loading…
Reference in New Issue
Block a user