Commit Graph

17 Commits (a264c2b5cf14cc22fe23e90eae854c2d5536ad4c)

Author SHA1 Message Date
Andreas Hartmetz 03f0dc51d7 Revert "Remove saving and loading (and client matching by) WM_COMMAND."
This reverts commit 2eac7634cc.

Cherry-picked from 5.6.

CCBUG: 362671
2016-06-23 21:07:03 +02:00
Andreas Hartmetz 2eac7634cc Remove saving and loading (and client matching by) WM_COMMAND.
This legacy session management scheme using the WM_COMMAND property
seems to be called XSM. It is very, very legacy because it was
superseded by XSMP in 1993(!).

By inspecting ~/.config/session/kwin_[...] I could see that Firefox
still sets WM_COMMAND, but nothing else in a regular session with
some applications.
As one of the last applications to switch to XSMP session management,
I guess Firefox keeps doing that because it still needs to work on,
say, Solaris, anyway, so why not set WM_COMMAND on Linux as well.
The WM_COMMAND set by Firefox looks like "wmCommand8=firefox\s" in
the kwin session file. It doesn't actually contain a session
identifier. But then, Firefox only has one session per user anyway.

This goes together with commit 5f0ca1305db4a925 in plasma-workspace /
ksmserver to remove legacy session management support.

I've talked about my plan to do this on IRC with Martin so hopefully
it's okay to just do this now.
2016-01-09 03:53:47 +01:00
Martin Gräßlin 2f7597e522 Move transients from Client to AbstractClient
Unfortunately introduces a few casts to Client again.
2015-09-16 13:54:47 +02:00
Martin Gräßlin 2da04aa26b Use auto where we call ensureStackingOrder(client->transients())
Preparation step for switching transients from Client to AbstractClient.
2015-09-16 13:54:47 +02:00
Ivan Čukić 362a0d3efb Windows retain their assigned activities on kwin restart
The issue is essentially this - KActivities are now an asynchonous
library, while KWin tries to use them in the old manner.

When kwin restarts, it tries to validate the activity list of a window
against an invalid list of activities it thinks it gets from KAMD
because it does not check for the service status.

This patch disables the validation in the case of kwin restart/crash.
When starting kwin will see KActivities::Consumer::serviceStatus return
Unknown (before the class actually receives a response from the service
and starts syncing the data).

After kwin has started, the response will arrive and the service status
will change either to Running or NotRunning. The patch changes nothing
for this case.

BUG: 335967
REVIEW: 122577
2015-02-16 00:01:04 +01:00
Nick Shaforostoff 607b3f0bc9 small string optimizations 2015-01-24 02:13:45 +00:00
Daniel Pastushchak 0d997b1093 Introduce categorized logging for kwin core
Done by Daniel Pastushchak for KDE during GCI-2014.
2014-12-05 14:27:15 +01:00
Ivan Čukić b995c9da23 KWin activities usage ported to the new library paradigm
Since the KActivities library now keeps an internal cache (and is
non-blocking), there is no point in thread-based information
fetching.

BUG: 335396
REVIEW: 118443
2014-06-01 18:58:36 +02:00
Aleix Pol c72e519d9c Remove KDE/ prefix in include directories
It's unneeded and deprecated since KF5.
2014-03-17 16:24:10 +01:00
Martin Gräßlin dc9f613113 [kwin] Do not use camelcase includes for kactivities
Jenkins doesn't like them, so let's try without them.
2014-02-04 09:36:15 +01:00
Martin Gräßlin 93f9918905 [kwin] Change to new connect syntax for KActivities
Just to be sure, that we get a compile error in case it changes.
2014-02-03 13:44:06 +01:00
Martin Gräßlin 9414d8f7f1 [kwin] Re-enable KActivities support
* KWin lists the activities in the Alt+F3 menu
* Kcmrules though looks wrong
2014-02-03 13:40:47 +01:00
Bhushan Shah 935851a2b5 kDebug -> qDebug in kwin 2013-11-01 17:00:41 +05:30
Martin Gräßlin 139201a2e2 KGlobal::config() -> KSharedConfig::openConfig()
KWin Core says good bye to KGlobal. We will not miss the threading
issues.
2013-09-04 16:11:40 +02:00
Martin Gräßlin 57905c0cc2 And we got rid of KDebug
Usages of kBacktrace got dropped.
2013-09-02 13:14:39 +02:00
Martin Gräßlin 0fb27fd12e Defines to create the boilerplate code for KWin's singleton classes
The define KWIN_SINGLETON adds to a class definition:

public:
    static Foo *create(QObject *parent = 0);
    static Foo *self() { return s_self; }
protected:
    explicit Foo(QObject *parent = 0);
private:
    static Foo *s_self;

There is an additional define KWIN_SINGLETON_VARIABLE to set a different
name than s_self.

The define KWIN_SINGLETON_FACTORY can be used to generate the create
method. It expands to:

Foo *Foo::s_self = 0;
Foo *Foo::create(QObject *parent)
{
    Q_ASSERT(!s_self);
    s_self = new Foo(parent);
    return s_self;
}

In addition there are defines to again set a different variable name and
to create an object of another inheriting class.

All the classes currently using this pattern are adjusted to use these
new defines. In a few places the name was adjusted. E.g. in Compositor
the factory method was called createCompositor instead of create.

REVIEW: 109865
2013-04-15 09:57:25 +02:00
Martin Gräßlin da85b5fdc7 Split out Activities related code from Workspace
All activities related code moves into new singleton class Activities.
This class gets only included into the build if the build option is
enabled which means there are less ifdefs all over the code and it also
handles better the moc doesn't like ifdef case.

The class holds the list of open and all activites, the current and the
previous activity and the KActivities::Controller. It also emits the
signals for any activities related changes.

Workspace still contains some activities related code. That is the
adjustment on change of current activity. Nevertheless the code looks
much cleaner now and does not contain the confusing naming conflict with
takeActivity() which existed before.

In all the places where Activities got used the code got adjusted and
quite often the ifdef got added with a fallback for the disabled case.
2013-04-11 13:01:36 +02:00