Commit graph

14398 commits

Author SHA1 Message Date
Martin Gräßlin
319869881c Connect Application::screensCreated to WaylandServer::initOutputs
Summary:
Instead of having the Application invoke initOutputs after creating
the Screens, we can just connect to the signal emitted there.

This allows to make initOutputs a private, WaylandServer internal
method.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1482
2016-05-02 15:52:07 +02:00
Martin Gräßlin
f8f8e61466 Make integration with KScreenLocker optional in WaylandServer
Summary:
In order to start the WaylandServer in kwin_x11 we need to make sure
that WaylandServer does not start the KScreenLocker integration. On
X11 the lock screen is provided by a different application (in Plasma
by ksmserver).

A new init flag is added to WaylandServer to not integrate with
KScreenLocker. Thus the default is still to integrate with KScreenLocker.

All direct usages of KScreenLocker are guarded to not be called if
the screenlocker integration is not present.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1481
2016-05-02 15:51:19 +02:00
Sebastian Kügler
8e36d9c8e1 add override to bufferForScreen
Summary: This seems to just have been forgotten here.

Test Plan: Builds

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1499
2016-05-02 14:50:23 +02:00
l10n daemon script
33d0f02bf0 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-28 13:03:57 +00:00
l10n daemon script
08f311eec8 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-27 09:34:18 +00:00
Martin Gräßlin
046d06716c [autotest] Remove workaround in ScreenEdgeTest with Qt 5.6.1
With eda4f61037 we introduced a workaround
for a problem introduced in Qt 5.5.1. This seems to be fixed in Qt 5.6.1.
2016-04-26 15:51:16 +02:00
Martin Gräßlin
2273fc0559 Cancel the EffectLoader query on clear
The Scripted and PluginEffectLoader perform locating all effects which
are to be loaded in a thread. When the EffectLoader gets cleared so far
the query did not get canceled. This resulted in effects maybe getting
loaded.

This problems shows on build.kde.org if the test is too fast and tears
down the Effect system while effects are still being queried.

Reviewed-By: David Edmundson
2016-04-26 15:01:15 +02:00
Martin Gräßlin
e614789583 Destroy Workspace after unloading all effects
CI system shows that on tear down an effect might call into Workspace
after it's destroyed. Unloading all effects prior to deleting Workspace
should(TM) fix that. Unfortunately I'm not able to reproduce the problem
locally, so build.kde.org needs to verify.
2016-04-26 13:40:24 +02:00
Martin Gräßlin
e64450c807 Merge branch 'Plasma/5.6' 2016-04-26 13:13:17 +02:00
Martin Gräßlin
6d60f01ad9 Skip DontCrashEmptyDecorationTest if we don't have a /dev/dri/card0 device
Without the /dev/dri/card0 mesa fails to initialize egl and the test
fails. In order to silence the failure till the system provides the
device file, we better skip the test.

A nullptr crash in that case is fixed in WaylandServer tear-down.
2016-04-26 12:47:02 +02:00
l10n daemon script
2010bedb1e 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-25 10:26:42 +00:00
Luigi Toscano
654a17686e Conditionally compile tests which depend on XCB_ICCCM
Summary: Move/Resize and Strut tests Wayland tests are affected.

Test Plan: Successful compilation when XCB_ICCCM is not found

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1476
2016-04-25 11:27:51 +02:00
Martin Gräßlin
537cc148df Get the logind session to take over through env variable instead of own PID
Summary:
So far KWin resolved the logind session to take over by  using its own
PID with the method GetSessionByPID. This doesn't work if KWin itself
is not part of the session or if KWin is supposed to take over a
different session.

The session to take over is now derived from XDG_SESSION_ID. If it is
not set the variant through getSessionByPID is used.

This allows to e.g. run kwin on vt1, but have the graphical output
on vt2. Thus it's possible to see the debug output. Also it should allow
to run kwin_wayland through an ssh session, so that gdb can be used.

If we take over another session on a different vt, we need to make sure
that it's the current virtual terminal. Otherwise assumptions in the
startup code would break. So let's ensure the session we integrate with
is active.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1445
2016-04-22 14:20:06 +02:00
Martin Gräßlin
64f7de4024 [platforms/hwcomposer] Remove integration with VirtualTerminal
The hwcomposer plugin doesn't need it. It was only created for the
need of libinput relying on it. As libinput doesn't need it any more,
hwcomposer doesn't need to integrate with VirtualTerminal.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1444
2016-04-22 14:18:56 +02:00
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
Jonathan Riddell
8b2e032f96 Update version number for 5.6.3
GIT_SILENT
2016-04-19 11:51:12 +01: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
380c5e0bd8 [autotests] Only start Xwayland if compositor created a scene
Same as df2c26e3d9 for
WaylandTestApplication.
2016-04-14 10:29:27 +02:00
Martin Gräßlin
df2c26e3d9 Only start Xwayland server if Compositor created a Scene
So far if the Scene creation failed kwin_wayland went into a shutdown,
but didn't succeed because the thread to start Xwayland was already
running: it froze.

This change introduces a new signal in Compositor: sceneCreated. The
startup of Xwayland is bound to this signal. If it gets fired KWin can
startup Xwayland. If it does not get fired, KWin terminates correctly.
2016-04-14 08:51:16 +02:00
Martin Gräßlin
0df4406c2c Fix crash on repainting an invalid sizes decoration
Summary:
If a window has an invalid size the decoration also has an invalid
size. This results in the texture used by the
SceneOpenGLDecorationRenderer to be invalid and being reset to null.
Of course we shouldn't try to use this texture to render to.

The change comes with a test case to simulate the situation. We cannot
simulate it with Wayland clients as the geometry can never be empty.
Thus we create an X11 client, resize it to an empty size and unmap it.

This is the first integration test case which creates an X11 Client!
It's also a test case which needs the OpenGL compositor. This will most
likely not work on build.kde.org yet - we need to see what to do about
it. Will need adjustments to get it at least skip on build.kde.org.

BUG: 361551
FIXED-IN: 5.6.3

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1383
2016-04-14 07:35:51 +02: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