Commit graph

14327 commits

Author SHA1 Message Date
Martin Gräßlin
2ecd097e87 [plugins/drm] Drop dependency on VirtualTerminal
Only integrates with Logind to find out when the session is active.
2016-04-22 14:18:56 +02:00
Martin Gräßlin
a25bf237e0 Integrate libinput only through Logind instead of relying on VirtualTerminal
All the important information like whether we are on the active vt are
also provided by Logind. So instead of integrating with VirtualTerminal,
which integrates with Logind, we can just integrate with Logind directly.
2016-04-22 14:18:56 +02:00
Martin Gräßlin
a21ad8d4fa Switch virtual teminal through logind seat
When we get the key code for virtual terminal switching we pass it
to Logind instead of going through the "legacy" ioctl interface.
2016-04-22 14:18:56 +02:00
Martin Gräßlin
e435b73fed Get the Logind seat for our logind session
In order to switch virtual terminals through logind we need to know
the Seat object for our session.
2016-04-22 14:18:56 +02:00
l10n daemon script
21f246c279 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-21 10:02:53 +00:00
Andreas Sturmlechner
03f4f972d6 Fix build with future glibc (major/minor macros)
See also: https://sourceware.org/ml/libc-alpha/2015-11/msg00452.html

REVIEW: 127662
2016-04-20 19:03:34 +02:00
Burkhard Lück
d32fbf54ca Update kwindecoration docbook to 5.6
options were splitted in two tabs
REVIEW:127653
2016-04-20 16:20:43 +02:00
l10n daemon script
93034e04cf SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-20 09:37:30 +00:00
Eike Hein
f2e4e11929 Hook up virtual_desktop_changeable state.
Summary: Depends on D1448.

Reviewers: graesslin

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1449
2016-04-20 01:35:54 +09:00
Eike Hein
7804a352a8 Hook up movable and resizable states.
Summary:
Sets movable and resizable states on the Wayland window.

kwin doesn't have state change signals for this, so it's a one-time thing.

Depends on D1432.

Reviewers: graesslin

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1434
2016-04-19 21:08:53 +09:00
Martin Gräßlin
e73a86d420 Create screen edge through the Platform
Removes a diversion between X11 and Wayland. The base class Platform
creates an instance of class Edge with plugin implementations being
able to create a different type.

The X11StandalonePlugin does that and creates a WindowBasedEdge. For
this the implementation of WindowBasedEdge is moved from screenedges
into the plugin.

Unfortunately an ifdef is needed to make the screenedge test still
work as expected. This should be improved in future, e.g. have a good
way to load the platform plugin from the tests.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1419
2016-04-19 13:29:55 +02:00
Martin Gräßlin
736ad55e37 Add ::window() and ::approachWindow as virtual methods to Edge
This allows to no longer needing to dynamic cast the Edge to
WindowBasedEdge for the X11 specific event handling.
2016-04-19 13:29:55 +02:00
Martin Gräßlin
80995fc205 Remove the AreaBasedEdge class
No difference to Edge.
2016-04-19 13:29:55 +02:00
Martin Gräßlin
8eab26c577 ShellClient's m_shellSurface might be null
Summary:
In preparation to support xdg-shell we need to make sure that ShellClient
does not assume m_shellSurface to not be null.

Everything that can be done through the surface() is resolved through
surface(). All accesses to m_shellSurface are nullptr checked.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1441
2016-04-19 13:29:23 +02:00
Martin Gräßlin
013de158b7 Move ShellClient initialization code into a dedicated init method
Summary:
Preparation for also supporting XdgShell. There will be different
ctors for ShellSurface and XdgShell, but most code needs to be shared.
Thus a dedicated init method is needed.

There is some restructuring in the init. All code depending on
ShellSurface being set is grouped and in an if block.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1440
2016-04-19 13:28:54 +02:00
Eike Hein
6b869f1355 Switch to naming suggested by native speakers. 2016-04-19 18:57:19 +09:00
Eike Hein
ef6a2cfa64 Expose client shade state to kwayland's interface.
Summary:
Makes use of new API in kwayland to expose shade state.

Depends on D1417.

Reviewers: graesslin

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1418
2016-04-19 18:57:19 +09:00
Martin Gräßlin
e2e6d8b08b Warp the cursor pos to the specificed global position in a NET::Move request
Summary:
The cursor position is the reference KWin uses while moving a window.
If we don't warp the cursor position the window "jumps" to the cursor
position on first movement.

For requests triggered by the client (e.g. widget style) this does not
matter as the cursor is at the correct position. But for tools such as
task bars we should ensure the cursor is at the right pos.

Reviewers: #plasma, hein

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1421
2016-04-18 07:50:06 +02:00
l10n daemon script
1309b8c8a0 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-16 09:59:16 +00:00
Martin Gräßlin
d47e206beb Don't check window system when creating SceneQPainter
Summary:
For one SceneQPainter is only used on Wayland and it can be created
through the Platform, so no different code pathes needed even if we
had SceneQPainter on X11.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1416
2016-04-15 15:22:15 +02:00
Martin Gräßlin
4ef07494bd Don't check for waylandServer() when accessing the platform in Compositor
Summary: Less diversions between X11 and Wayland.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1415
2016-04-15 15:21:49 +02:00
Martin Gräßlin
e4c333a372 Move clients/ to plugins/kdecorations/
Summary:
KWin's plugins are now all in a plugins subdirectory. This is a good
argument to also move the window decoration plugins there. The name
clients was not really good anyway and makes it difficult for people
not familiar with the code base to find it. Having it under plugins
is the more expectable location.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1414
2016-04-15 15:21:03 +02:00
Martin Gräßlin
702b84b925 Move the EglOnXBackend to the x11 platforms
Summary:
The EglOnXBackend is no longer needed in the core. It's only needed by
the two x11 platform plugins. To best share it, it's moved into a common
directory and compiled into a static library which in turn is linked by
the two plugins.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1413
2016-04-15 09:15:20 +02:00
Martin Gräßlin
248991223b Move glxbackend to x11 standalone plugin
Summary:
It's only needed by the standalone x11 variant. This allows us to
simplify the creation of the OpenGLBackend: it's created by the
platform plugin - we don't need custom complex logic.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1392
2016-04-15 07:46:02 +02:00
l10n daemon script
a3cd28a87e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-14 09:57:09 +00:00
Martin Gräßlin
b4b0b100df [plugins/platforms/drm] Fix includes
Incorrect includes resulted in build without GBM to fail.
2016-04-13 14:10:25 +02:00
l10n daemon script
9a10eabc11 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-13 09:34:52 +00:00
Martin Gräßlin
bc25677caf Strut sanity checking: ignore struts which would exclude a complete screen
Summary:
Mostly meant for multi-screen setups: we don't want that a strut set on
a window on screen 0 results in screen 1 completely being excluded. Even
if that's strictly seen a client bug, it's better to just ignore the
strut from KWin's side.

The sanity check is implemented in Client::adjustedClientArea.

From a pure standard point of view this change is a EWMH violation and
thus can cause regressions: struts by clients no longer working.

A test case for struts is added, including some invalid combinations
whose strut is ignored with this change.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1386
2016-04-12 16:55:19 +02:00
Martin Gräßlin
e5648dcf4c [plugins/platforms] Dedicated logging category for X11 standalone platform 2016-04-12 14:48:54 +02:00
l10n daemon script
11cca79ecf SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-12 11:13:09 +00:00
Martin Gräßlin
5646313c2c Add an explicit dependency to Breeze to find decoration plugin
Summary:
KWin needs the plugin id of the breeze decoration plugin. Instead
of hard coding that it's now resolved through an optional dependency.
If the optional dependency is not available, the default is adjusted
to aurorae/plastik.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1344
2016-04-12 08:54:50 +02:00
Martin Gräßlin
18939e17ed Move XRandrScreens to the x11/standalone plugin
By moving XRandrScreens the creation of screens gets simplified a lot
as there is no need to have windowing system specific init code. It all
just goes through the platform.

This also marks the point where the first X11 specific code is removed
from kwin_wayland.

Reviewers: #plasma, sebas

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1355
2016-04-12 08:04:16 +02:00
Martin Gräßlin
8b148fa11a Load and init the KWinX11Platform plugin in main_x11
kwin_x11 now also loads a platform plugin and initializes it.
It doesn't do much except loading it and init it. Though it's also
set up to continue startup only when screens are queried.
2016-04-12 08:04:16 +02:00
Martin Gräßlin
ee89f3f34f Add a very basic x11/standalone platform plugin
The plugin does not much. It's the most basic plugin we can have to
be loaded from kwin_x11.

Unlike the wayland platform plugins it gets installed to:
org.kde.kwin.platforms
2016-04-12 08:04:16 +02:00
Martin Gräßlin
33dffc0fd7 Move the x11 plugin sources into a x11/windowed directory
Preparation step for having two x11 backends: the windowed for Wayland
and a standalone for kwin_x11.
2016-04-12 08:04:16 +02:00
Martin Gräßlin
2bff90976e Move backends/ to plugins/platforms/
Summary:
Source code reorganization:
The base class AbstractBackend got renamed to Platform, thus the
"backends" are "platforms" now. As they are plugins they should go
together with other KWin plugins which are nowadays in the folder
plugins.

So new location is plugins/platforms/

Reviewers: #plasma, sebas

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1353
2016-04-12 08:01:27 +02:00
l10n daemon script
390bad1ed8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-11 10:23:59 +00:00
l10n daemon script
240be60787 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-10 09:41:00 +00:00
l10n daemon script
58e2bca56d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-09 09:58:54 +00:00
l10n daemon script
bfda50ab68 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-08 09:41:47 +00:00
Ivan Čukić
1fef4760bf Testing whether m_lastCreatedSettings is not null before calling its method
Summary:
It looks like something was forgotten here - there is
a completely empty body for an if statement that checks
whether the pointer is null.
So this might not be the desired way to fix this.
Should m_lastCreatedSettings be instantiated instead?

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1348
2016-04-08 09:26:48 +02:00
Ivan Čukić
f06dff3390 Checking whether the m_textTexture is not null before dereferencing it
Summary:
It can be null even after updateTextTexture() if there is not text
to generate the texture from:

        if (m_effectFrame->text().isEmpty())
            return;

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1347
2016-04-08 09:26:17 +02:00
Ivan Čukić
2c95a4e6b9 Checking whether m_topLevel is not null before getting its property
Summary:
From the rest of this method, it is obvious that m_topLevel can
be null in any part of the method - we are checking against it
being null in a few places in the method - both before and after
the affending lines.

Now, there is one place where the check is not applied, and
potentially calls ->window() on the null pointer.

p.s. If there are more places where kwin does clear_or_something(); return;
it could benefit from introducing on_scope_exit and similar tricks - see
Alexandrescu's 'Declarative control flow' presentation.

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1346
2016-04-08 09:25:28 +02:00
Martin Gräßlin
d31e9e88b4 Rename abstract_backend.(h|cpp) to platform.(h|cpp)
Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1340
2016-04-07 16:18:12 +02:00
Martin Gräßlin
10632f09ca Rename AbstractBackend to Platform 2016-04-07 16:18:12 +02:00
Martin Gräßlin
1d4cd55b9d Drop backend() -> AbstractBackend* from WaylandServer
No longer needed, provided through Application::platform().

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1339
2016-04-07 15:00:11 +02:00
Martin Gräßlin
146af48f22 waylandServer()->backend() replaced by kwinApp()->platform() 2016-04-07 15:00:11 +02:00
l10n daemon script
58b59d3e20 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-07 10:11:11 +00:00
Martin Gräßlin
7996d954c5 Provide the platform() -> AbstractBackend* in KWin::Application
Summary:
This is the first change in a refactoring series. The aim is to:
* rename AbstractBackend to Platform
* move backends/ to plugins/platforms/
* don't bind platforms to Wayland only
* provide a platform plugin for "normal" X11
* share more code between X11 and Wayland

This change moves the platform/backend from waylandServer to Application.
The init of the plugin happens directly in the Application from the
KPluginMetaData. There is no need to externally init it and set the
parent.

WaylandServer::backend() currently just delegates to
kwinApp()->platform(), the idea is to drop this method completely.

The test infrastructure is also adjusted to this change.

Test Plan: kwin_wayland still works, all tests pass

Reviewers: #plasma, sebas

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1331
2016-04-07 08:00:12 +02:00
Martin Gräßlin
8d851a0252 Announce support for subcompositor protocol
Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1282

BUG: 361403
2016-04-07 07:59:28 +02:00