Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=e8ecec5e6c03f0b3c77d2d27cd836d37b0909f09
commit e8ecec5e6c03f0b3c77d2d27cd836d37b0909f09 Author: crazy <[email protected]> Date: Tue Jun 28 23:07:12 2016 +0200 kwin5-5.6.5-2-x86_64 * fix for GTK apps SM saving .. backport from git ( part 1 ) diff --git a/source/plasma/kwin5/FrugalBuild b/source/plasma/kwin5/FrugalBuild index 215fbac..28af43d 100644 --- a/source/plasma/kwin5/FrugalBuild +++ b/source/plasma/kwin5/FrugalBuild @@ -3,13 +3,14 @@ pkgname=kwin5 pkgver=5.6.5 -pkgrel=1 +pkgrel=2 pkgdesc="KDE Window Manager." groups=('plasma') archs=('i686' 'x86_64') _F_kde_project="plasma" _F_gnome_iconcache=y -Finclude gnome-scriptlet kf5 +Finclude kf5 +source+=(saving_and_loading-BUG-362671-part1.patch) depends=("kcmutils>=$_F_kf5_full" "kinit>=$_F_kf5_full" "knewstuff>=$_F_kf5_full" "qt5-multimedia>=$_F_kdever_qt5" \ "kidletime>=$_F_kf5_full" "plasma-framework>=$_F_kf5_full" "kdecoration>=$_F_kdever_plasma" \ "kwayland>=$_F_kf5_full" "kscreenlocker>=$_F_kdever_plasma" 'xcb-util-cursor' 'libwayland-egl') @@ -19,6 +20,7 @@ replaces=('kwin') conflicts=("${replaces[@]}") provides=("${replaces[@]}") -sha1sums=('2010993cd2a15875a87fad5e689dcb4786965562') +sha1sums=('2010993cd2a15875a87fad5e689dcb4786965562' \ + 'c6efdc614e24a680a9f5d84c01cd62339fb1f337') # optimization OK diff --git a/source/plasma/kwin5/saving_and_loading-BUG-362671-part1.patch b/source/plasma/kwin5/saving_and_loading-BUG-362671-part1.patch new file mode 100644 index 0000000..393cbfb --- /dev/null +++ b/source/plasma/kwin5/saving_and_loading-BUG-362671-part1.patch @@ -0,0 +1,138 @@ +From: Andreas Hartmetz <[email protected]> +Date: Thu, 23 Jun 2016 17:40:40 +0000 +Subject: Revert "Remove saving and loading (and client matching by) WM_COMMAND." +X-Git-Url: http://quickgit.kde.org/?p=kwin.git&a=commitdiff&h=59740e7416bb2b3a9852212fa4b213e5ba76deb7 +--- +Revert "Remove saving and loading (and client matching by) WM_COMMAND." + +This reverts commit 2eac7634cc524bf5e425cf081a639a6b6407e380. + +CCBUG: 362671 +--- + + +--- a/activities.cpp ++++ b/activities.cpp +@@ -169,7 +169,7 @@ + const Client* c = (*it); + const QByteArray sessionId = c->sessionId(); + if (sessionId.isEmpty()) { +- continue; ++ continue; //TODO support old wm_command apps too? + } + + //qDebug() << sessionId; + +--- a/sm.cpp ++++ b/sm.cpp +@@ -109,8 +109,12 @@ + for (ClientList::Iterator it = clients.begin(); it != clients.end(); ++it) { + Client* c = (*it); + QByteArray sessionId = c->sessionId(); ++ QByteArray wmCommand = c->wmCommand(); + if (sessionId.isEmpty()) +- continue; ++ // remember also applications that are not XSMP capable ++ // and use the obsolete WM_COMMAND / WM_SAVE_YOURSELF ++ if (wmCommand.isEmpty()) ++ continue; + count++; + if (c->isActive()) + active_client = count; +@@ -140,6 +144,7 @@ + QString n = QString::number(num); + cg.writeEntry(QLatin1String("sessionId") + n, c->sessionId().constData()); + cg.writeEntry(QLatin1String("windowRole") + n, c->windowRole().constData()); ++ cg.writeEntry(QLatin1String("wmCommand") + n, c->wmCommand().constData()); + cg.writeEntry(QLatin1String("resourceName") + n, c->resourceName().constData()); + cg.writeEntry(QLatin1String("resourceClass") + n, c->resourceClass().constData()); + cg.writeEntry(QLatin1String("geometry") + n, QRect(c->calculateGravitation(true), c->clientSize())); // FRAME +@@ -180,8 +185,12 @@ + for (ClientList::Iterator it = clients.begin(); it != clients.end(); ++it) { + Client* c = (*it); + QByteArray sessionId = c->sessionId(); ++ QByteArray wmCommand = c->wmCommand(); + if (sessionId.isEmpty()) +- continue; ++ // remember also applications that are not XSMP capable ++ // and use the obsolete WM_COMMAND / WM_SAVE_YOURSELF ++ if (wmCommand.isEmpty()) ++ continue; + if (!sessionIds.contains(sessionId)) + continue; + +@@ -221,6 +230,7 @@ + session.append(info); + info->sessionId = cg.readEntry(QLatin1String("sessionId") + n, QString()).toLatin1(); + info->windowRole = cg.readEntry(QLatin1String("windowRole") + n, QString()).toLatin1(); ++ info->wmCommand = cg.readEntry(QLatin1String("wmCommand") + n, QString()).toLatin1(); + info->resourceName = cg.readEntry(QLatin1String("resourceName") + n, QString()).toLatin1(); + info->resourceClass = cg.readEntry(QLatin1String("resourceClass") + n, QString()).toLower().toLatin1(); + info->geometry = cg.readEntry(QLatin1String("geometry") + n, QRect()); +@@ -269,6 +279,7 @@ + SessionInfo *realInfo = 0; + QByteArray sessionId = c->sessionId(); + QByteArray windowRole = c->windowRole(); ++ QByteArray wmCommand = c->wmCommand(); + QByteArray resourceName = c->resourceName(); + QByteArray resourceClass = c->resourceClass(); + +@@ -302,8 +313,10 @@ + if (info->resourceName == resourceName + && info->resourceClass == resourceClass + && sessionInfoWindowTypeMatch(c, info)) { +- realInfo = info; +- session.removeAll(info); ++ if (wmCommand.isEmpty() || info->wmCommand == wmCommand) { ++ realInfo = info; ++ session.removeAll(info); ++ } + } + } + } + +--- a/sm.h ++++ b/sm.h +@@ -41,6 +41,7 @@ + struct SessionInfo { + QByteArray sessionId; + QByteArray windowRole; ++ QByteArray wmCommand; + QByteArray wmClientMachine; + QByteArray resourceName; + QByteArray resourceClass; + +--- a/toplevel.cpp ++++ b/toplevel.cpp +@@ -177,6 +177,19 @@ + return result; + } + ++/*! ++ Returns command property for this client, ++ taken either from its window or from the leader window. ++ */ ++QByteArray Toplevel::wmCommand() ++{ ++ QByteArray result = Xcb::StringProperty(window(), XCB_ATOM_WM_COMMAND); ++ if (result.isEmpty() && wmClientLeaderWin && wmClientLeaderWin != window()) ++ result = Xcb::StringProperty(wmClientLeaderWin, XCB_ATOM_WM_COMMAND); ++ result.replace(0, ' '); ++ return result; ++} ++ + void Toplevel::getWmClientMachine() + { + m_clientMachine->resolve(window(), wmClientLeader()); + +--- a/toplevel.h ++++ b/toplevel.h +@@ -274,6 +274,7 @@ + QByteArray sessionId() const; + QByteArray resourceName() const; + QByteArray resourceClass() const; ++ QByteArray wmCommand(); + QByteArray wmClientMachine(bool use_localhost) const; + const ClientMachine *clientMachine() const; + Window wmClientLeader() const; + _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
