allow popups to be shown in any form factor; it really only depends on whether or not there is a dialog
svn path=/trunk/KDE/kdelibs/; revision=903182
This commit is contained in:
parent
d1df2a627e
commit
93a5168b01
@ -370,12 +370,12 @@ bool PopupApplet::eventFilter(QObject *watched, QEvent *event)
|
||||
|
||||
void PopupApplet::showPopup(uint popupDuration)
|
||||
{
|
||||
if (d->dialog && (formFactor() == Horizontal || formFactor() == Vertical)) {
|
||||
if (d->dialog) {
|
||||
// move the popup before its fist show, even if the show isn't triggered by
|
||||
// a click, this should fix the first random position seen in some widgets
|
||||
d->updateDialogPosition();
|
||||
d->dialog->show();
|
||||
KWindowSystem::setState(d->dialog->winId(), NET::SkipTaskbar | NET::SkipPager);
|
||||
if (!d->dialog->isVisible()) {
|
||||
d->internalTogglePopup();
|
||||
}
|
||||
|
||||
if (d->timer) {
|
||||
d->timer->stop();
|
||||
@ -401,10 +401,8 @@ void PopupApplet::hidePopup()
|
||||
|
||||
void PopupApplet::togglePopup()
|
||||
{
|
||||
if (d->dialog && (formFactor() == Horizontal || formFactor() == Vertical)) {
|
||||
d->internalTogglePopup();
|
||||
}
|
||||
}
|
||||
|
||||
Plasma::PopupPlacement PopupApplet::popupPlacement() const
|
||||
{
|
||||
@ -466,7 +464,10 @@ PopupAppletPrivate::~PopupAppletPrivate()
|
||||
|
||||
void PopupAppletPrivate::internalTogglePopup()
|
||||
{
|
||||
if (dialog) {
|
||||
if (!dialog) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (timer) {
|
||||
timer->stop();
|
||||
}
|
||||
@ -483,7 +484,6 @@ void PopupAppletPrivate::internalTogglePopup()
|
||||
|
||||
dialog->clearFocus();
|
||||
}
|
||||
}
|
||||
|
||||
void PopupAppletPrivate::hideTimedPopup()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user