kdelibs/kdelibs-4.2.3-fixPopupForPl...

72 lines
3.0 KiB
Diff

From: =?iso-8859-1?q?Bj=F6rn_Ruberg?= <bjoern@ruberg-wegener.de>
To: kde-packager@kde.org
Subject: kdelibs patch for making virtual keyboard work
Date: Sat, 6 Jun 2009 23:40:47 +0200
Message-Id: <200906062340.47628.bjoern@ruberg-wegener.de>
Hello,
I want you to have a look at the patch attached. It's from current KDE 4.2 and
4.3 trunk. It didn't make it into KDE 4.2.4, but maybe you want to apply it to
your KDE packages.
It is needed for making the plasmoid plasmaboard working. Plasmaboard is a
virtual keyboard for plasma. Find it here:
http://www.kde-look.org/content/show.php/Plasmaboard?content=101822
Without the patch, opening plasmaboard will steal window focus, what makes the
plasmoid useless.
Please notify me if this patch find its way in your distribution so I can
maintain a list for the plasmaboard users.
Regards,
Björn Ruberg
Index: kdelibs/plasma/popupapplet.cpp
===================================================================
--- kdelibs/plasma/popupapplet.cpp (Revision 976120)
+++ kdelibs/plasma/popupapplet.cpp (Arbeitskopie)
@@ -275,11 +275,7 @@
//stuff out of your Dialog (extenders). Monitor WindowDeactivate events so we can
//emulate the same kind of behavior as Qt::Popup (close when you click somewhere
//else.
- dialog->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
- updateDialogFlags();
- KWindowSystem::setState(dialog->winId(), NET::SkipTaskbar | NET::SkipPager);
- dialog->installEventFilter(q);
-
+
q->setMinimumSize(QSize(0, 0));
if (gWidget) {
Corona *corona = qobject_cast<Corona *>(gWidget->scene());
@@ -289,14 +285,25 @@
corona->addOffscreenWidget(gWidget);
dialog->setGraphicsWidget(gWidget);
}
+
+ dialog->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | (gWidget->windowFlags() & Qt::X11BypassWindowManagerHint));
} else if (qWidget) {
QVBoxLayout *l_layout = new QVBoxLayout(dialog);
l_layout->setSpacing(0);
l_layout->setMargin(0);
l_layout->addWidget(qWidget);
dialog->adjustSize();
+
+ dialog->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | (qWidget->windowFlags() & Qt::X11BypassWindowManagerHint));
}
+ else {
+ dialog->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
+ }
+ updateDialogFlags();
+ KWindowSystem::setState(dialog->winId(), NET::SkipTaskbar | NET::SkipPager);
+ dialog->installEventFilter(q);
+
QObject::connect(dialog, SIGNAL(dialogResized()), q, SLOT(dialogSizeChanged()));
QObject::connect(dialog, SIGNAL(dialogVisible(bool)), q, SLOT(dialogStatusChanged(bool)));
}