File proper-activate.patch of Package psi+
From: Jiri Slaby <jslaby@suse.cz>
With QT5, this tries to load kdeui.so which loads libqt4 -> boom.
Instead of the hack, properly send an alert for the widget.
---
src/common.cpp | 13 +------------
src/tools/advwidget/advwidget.cpp | 4 ++++
2 files changed, 5 insertions(+), 12 deletions(-)
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -586,18 +586,7 @@ void bringToFront(QWidget *widget, bool)
w->raise();
w->activateWindow();
- // hack to real bring to front in kde. kde (at least 4.8.5) forbids stilling
- // focus from other applications. this may be fixed on more recent versions.
- // should be removed some day. preferable way for such hacks is plugins.
- // probably works only with gcc.
- if (qgetenv("DESKTOP_SESSION") == "kde-plasma") {
- typedef int (*ActWinFunction)(WId, long);
- ActWinFunction kwinActivateWindow = (ActWinFunction)QLibrary::resolve(
- "libkdeui", 5, "_ZN13KWindowSystem17forceActiveWindowEml");
- if (kwinActivateWindow) {
- kwinActivateWindow(widget->winId(), 0);
- }
- }
+ QApplication::alert(w);
}
bool operator!=(const QMap<QString, QString> &m1, const QMap<QString, QString> &m2)
--- a/src/tools/advwidget/advwidget.cpp
+++ b/src/tools/advwidget/advwidget.cpp
@@ -229,6 +229,9 @@ bool GAdvancedWidget::Private::flashing(
void GAdvancedWidget::Private::doFlash(bool yes)
{
+ if (yes)
+ QApplication::alert(parentWidget_->window());
+
flashing_ = yes;
if (parentWidget_->window() != parentWidget_)
return;
@@ -285,6 +288,7 @@ void GAdvancedWidget::Private::doFlash(b
}
XSendEvent(xdisplay, rootwin, False, (SubstructureRedirectMask | SubstructureNotifyMask), &e);
+ qDebug() << "tried to " << (yes ? "" : "de") << "flash a window " << parentWidget_->window()->windowTitle();
#else
Q_UNUSED(yes)
#endif