Commit graph

14662 commits

Author SHA1 Message Date
Jonathan Riddell
be3c3de44a Update version number for 5.7.2
GIT_SILENT
2016-07-19 11:43:46 +01:00
Martin Gräßlin
f27dceda2c Disable the locked screen check in Compositor::windowRepaintsPending
This is responsible for plasmashell freezing when screen is locked.

The change itself was not wrong, but we first need to enable the
infrastructure to "fake" rendering when screen is locked/disabled, etc.
2016-07-19 08:14:40 +02:00
Martin Gräßlin
5dcaad7fe8 [plugins/qpa] Add debug output in configFromGLFormat
We might need to know what kind of EGLConfig Qt wants.
2016-07-19 08:13:22 +02:00
Martin Gräßlin
54126e4571 [plugins/qpa] Check egl error after a failure of eglMakeCurrent
This hopefully helps to figure out why eglMakeCurrent fails on
hwcomposer platform.
2016-07-18 20:50:56 +02:00
Martin Gräßlin
dce3ea6a20 [plugins/qpa] Add debug output for the KWin internal QPA plugin
Reviewed-By: bshah
2016-07-18 16:34:03 +02:00
Martin Gräßlin
fb8434671f [autotests] Move libkwineffects/autotests to autotests/libkwineffects
All autotests shall be in autotests subdirectory.
2016-07-18 08:47:45 +02:00
Martin Gräßlin
a9f450db27 Allow to create an OpenGL Compositor with llvmpipe
Summary:
This is a radical change to the approach KWin used to have. So far KWin
fall back to XRender compositing if it detected llvmpipe. With this
change KWin will use OpenGL compositing also on llvmpipe.

This has drawbacks: it's CPU emulated which we actually do not want.
But the question is whether it still makes sense to keep the no-GL
enforcement.

There are several things to consider here:
* QtQuick will use llvmpipe anyway (including things like Plasmashell)
* glamor might be used in the xorg layer which also uses llvmpipe on
  XRender
* more consistent look
* we get OpenGL working in tests (important for e.g. openQA)
* hardware which does not support proper GL gets less, there are
  GL drivers for KVM, there are GL drivers for rPI, etc. We don't
  need to block it anymore because of possibly bad results on those
  hardware. Also they mostly use glamor.
* there is still the way to manually select XRender/QPainter compositing

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2184
2016-07-18 08:10:08 +02:00
Allen Winter
31f067ede2 pedantic fixes 2016-07-16 13:14:44 -04:00
Martin Gräßlin
6161c50187 [effects/slidingpopups] Don't reference previous pixmap
Not needed, it works without it.
2016-07-15 12:45:10 +02:00
Martin Gräßlin
d443e54901 Merge branch 'Plasma/5.7' 2016-07-15 10:05:43 +02:00
Martin Gräßlin
aa7fb81e00 Properly get error message for eglInitialize
If eglInitialize returns EGL_FALSE we should print a warning and try
to get the error code.
2016-07-15 10:04:39 +02:00
Martin Gräßlin
70167b748d [platforms/x11] Add more warning on failure to create EGL context
Some error conditions did not have a warning, so all we got is
"Could not initialize rendering context". Which is not helpful to
figure out what is going wrong.
2016-07-15 08:44:31 +02:00
Martin Gräßlin
1c275a02c8 [platforms/drm] Add better warnings in DrmBuffer if things fail
For virtual machines with Cirrus device the drmModeAddFB fails. So
far there was no error message at all, we only saw it failed.

With this change the drmModeAddFB is checked for error and a warning
is shown. Also further debug messages are added for other cases where
things can fail.

Reviewed-By: Eike Hein
2016-07-15 08:37:17 +02:00
Martin Gräßlin
57cc02096b Merge branch 'Plasma/5.7' 2016-07-14 13:52:41 +02:00
Martin Gräßlin
a1afeded6a Emit windowShown and windowHidden from Client::internalKeep and ::internalHide
Summary:
With this change auto-hiding panels are animated again by SlidingPopups
effect.

Test Plan: Test case adjusted, and tested in VM

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

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

BUG: 354407
FIXED-IN: 5.8.0
2016-07-14 11:11:49 +02:00
Martin Gräßlin
5e1e2be5e8 [autotests/integration] Add new test case for screenedge client show
A test to simulate auto-hiding panels. Preparation step for making the
slidingpopups effect working again for auto-hiding panels.

The test case simulates creating a panel at the screen edge, hides it
through the property and shows it again through the edge.
2016-07-14 09:45:03 +02:00
Martin Gräßlin
c3af4c3f9c Add support for xdg-shell version 5 interface
Summary:
The WaylandServer creates the XdgShellV5 interface and hooks it up
to create a ShellSurface whenever an xdg surface or xdg popup is created.

ShellClient gains some new ctors for the different variants and is
adjusted to delegate to xdg surface respectively.

With this change KWin mostly supports xdg-shell protocol. Still missing
is support for the "geometry" request which is rather difficult to
implement in KWin.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2108
2016-07-13 13:20:00 +02:00
l10n daemon script
dbdbee9a39 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-07-13 10:19:49 +00:00
Martin Gräßlin
c6b2562710 [effects] Adjust SlidingPopups to new windowShown and windowHidden signals
Summary:
With this change SlidingPopups is able to animate Wayland clients
properly, though windowHidden does not yet work for OpenGL based
windows (buffer seems to get lost somewhere).

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2085
2016-07-13 10:49:00 +02:00
Martin Gräßlin
5ee958ca7e [libkwineffects] Add signals windowShown and windowHidden to EffectsHandler
Summary:
This allows effects to animate when a window is shown again and when
a window gets hidden but not yet closed/destroyed. This situation
happens on X11 for e.g. auto hiding panels and on Wayland for pretty
much any window which properly unmaps (windowHidden) prior to destroy.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2084
2016-07-13 10:46:05 +02:00
Martin Gräßlin
a35ffa93d7 Use hiddenInternal() for a ShellClient which got unmapped
Summary:
So far when a ShellClient got unmapped ready_for_painting was set to
false. That is the ShellClient was treated in the same way as a not
yet shown window. It was completely excluded from painting, a close
animation impossible.

This change makes use of the functionality available in
Client::hiddenInternal(). The window is considered as hidden, thus
still excluded from e.g. getting input events, but could be rendered
any time as we still have a previous window pixmap (if referenced).
This allows to have it considered in the rendering pass, but effects
still cannot make use of it as that state is not yet exposed to the
effects.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2083
2016-07-13 10:45:10 +02:00
Martin Gräßlin
445335ba5f Merge signal connections for AbstractClient in Workspace
Summary:
Have one dedicated method which performs the connection for both
Client and ShellClient. This fixes the desktopPresenceChanged signal
not being passed to the effects.

Note that not all signals are merged. Most signals setup for Client
don't make sense for ShellClient as ShellClient cannot block composite
or unredirect.

Test Plan:
Test case added for ShellClient to ensure that the signal
is correctly invoked on the ShellClient, Workspace and EffectsHandler.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2059
2016-07-13 10:44:34 +02:00
Martin Gräßlin
f9725a6849 [tests] Fix build - missing include to QDebug
Sorry, worked on my system.
2016-07-13 10:13:47 +02:00
Martin Gräßlin
f0aeda0738 [platforms/fbdev] Handle error conditions more gracefully
Summary:
So far if the framebuffer platform run into an error on initialization
it did not continue and caused the system to freeze. With this change
it properly emits the initFailed signal in all error conditions which
causes kwin_wayland to terminate. This is a much better situation than
just staying in a running, but frozen state.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2149
2016-07-13 10:11:38 +02:00
Martin Gräßlin
e763abe91f [tests] Tool to read the X11 shadow on a window
Summary:
This new helper tool allows to read the X11 shadow from a window
and visualize the individual parts.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2101
2016-07-13 10:01:19 +02:00
Martin Gräßlin
3c04d5295d Handle situation of no XDG_RUNTIME_DIR gracefully
Summary:
If KWin fails to start the Wayland server due to XDG_RUNTIME_DIR not
being set, kwin_wayland should terminate with an error condition but
not crash.

This change makes sure that KWin detects that the Wayland server does
not work and terminates the startup early and ensures that it doesn't
crash while going down.

An error message is shown that we could not create the Wayland server.

Test Plan:
Test case added which verifies that WaylandServer fails to
init. Manual testing that kwin_wayland exits with error 1.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2078
2016-07-13 10:00:46 +02:00
Martin Gräßlin
76fa3026dd Merge branch 'Plasma/5.7' 2016-07-13 10:00:35 +02:00
Martin Gräßlin
56c2e158ee Call QCoreApplication::exit instead of stdlib exit to terminate if platform fails
Summary:
We need to properly tear down the application - this can be achieved
through QCoreApplication::exit. Otherwise there is a chance that the
cleanup handling crashes.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2136
2016-07-13 09:38:27 +02:00
Martin Gräßlin
cd9a0afafa [platforms/drm] Properly handle case that mapping the blank buffer fails
Summary:
If it's not possible to create a buffer to blank the output, KWin won't
be able to render to the output. In that case the output should not be
added to the list of outputs.

To support this DrmOutput::blank and DrmOutput::init return bool to
indicate whether they succeeded. DrmBackend handles this situation and
doesn't add the output to the list of outputs if init failed.

If after init there are no outputs KWin is in a state where it won't
be functional. Thus the platform emits the initFailed signal to
terminate.

BUG: 365242
FIXED-IN: 5.7.2

Test Plan: No hardware to reproduce the condition

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2135
2016-07-13 09:37:38 +02:00
Martin Gräßlin
aaf8ce16df [platforms/fbdev] Properly detect a BGR image format
Summary:
If the format of the framebuffer is BGR we cannot create an RGB image
format from it - the rendering is incorrect. Unfortunately QImage does
not support a BGR image format.

To solve this problem we still use an RGB image format but on rendering
the front buffer is rgbSwapped to convert the RGB image to a BGR image.

BUG: 365243
FIXED-IN: 5.7.2

Test Plan: Tested on a neon kvm

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2134
2016-07-13 09:37:02 +02:00
Martin Gräßlin
f8d556e630 [autotests/integration] Test another multi-screen setup
The struts test is extended by a setup containing two horizontal
screens, bottom aligned with the left screen smaller than the right.
Thus there is a dead area in the top left corner. In addition there's
a panel on top left screen.

Apparently KWin allowed windows to open in the dead area. The test
case reconstructs this by opening a window with the same size hints,
but in the test it's working correctly.
2016-07-13 07:59:18 +02:00
Jonathan Riddell
66174846f1 Update version number for 5.7.1
GIT_SILENT
2016-07-12 10:32:27 +01:00
Jonathan Riddell
231132ea30 Revert "Update version number for 5.7.1"
This reverts commit d5d1f90a6d.
2016-07-12 10:13:45 +01:00
Jonathan Riddell
d5d1f90a6d Update version number for 5.7.1
GIT_SILENT
2016-07-12 09:57:30 +01:00
David Edmundson
62d09fad12 Fix shadow rendering calculations
BUG: 365097

Reviewers: #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2100
2016-07-06 13:16:18 +01:00
Martin Gräßlin
2b5747dccb [autotests/integration] Unload effects before destroying Workspace
Brings in line with behavior in main_wayland.cpp and is needed as
effects might call into Workspace during tear down.
2016-07-04 14:37:35 +02:00
Martin Gräßlin
da36fd1c02 [autotests/integration] Try to make SceneQPainterTest::testWindow more robust
It was failing on the CI system due to timing. Reorder the signalspy
creation a little bit in the hope that this makes it pass.
2016-07-04 08:12:42 +02:00
Martin Gräßlin
7610ff49a8 [autotests/integration] Make MoveResizeWindowTest more robust
A few more cases where we need to ensure that the created window is
destroyed before going into next test method.

Interesting observation: the generated window ids are identical.
Possible problem with KWayland::ClientConnection?
2016-07-01 15:21:37 +02:00
Martin Gräßlin
ce74d8a5e5 [autotests] Try to make the move_resize_window_test more robust
On build.kde.org it's failing due to Windows being still present in
the next test method. This change tries to destroy them in the test
methods.
2016-07-01 12:37:09 +02:00
Martin Gräßlin
2780639936 [autotest] Add a test to SceneQPainterTest to render a window
New test method which verifies that a newly mapped window is rendered
correctly, that cursor image set on it is rendered correctly, also when
pointer moves.
2016-07-01 10:33:25 +02:00
l10n daemon script
e43699c4c5 SVN_SILENT made messages (after extraction) 2016-07-01 08:05:19 +00:00
Martin Gräßlin
cf3a1d295c [autotest/integration] Add helper for waiting for a shown ShellClient
Summary:
Many tests create a Wayland window, render it and then wait till it's
created in KWin as a ShellClient. To reduce code duplication the test
helper provides helper methods to wait for the next ShellClient to be
shown and to directly render and wait for the window for that to be
shown.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2057
2016-07-01 09:56:31 +02:00
Martin Gräßlin
513878e20d [autotest/integration] Introduce a Test helper library to have less code duplication
Summary:
A new namespace KWin::Test is added which provides a few helper
functions. It makes it easy to setup a KWayland client connection with
the base set to be able to create a Surface and flags to create
additional interfaces. This replaces the KWayland connection dance in
init() methods. For cleanup() there is also a dedicated helper function.

In addition there are helper functions to:
* render a surface
* create a surface
* create a shell surface
* flush the wayland client connection
* access to the created interfaces - for compatibility with existing code

The idea is to extend this Test library also for other common use cases
like creating an X11 connection and X11 windows, etc.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2053
2016-07-01 09:01:17 +02:00
Martin Gräßlin
1f2b47a83b [autotests/integration] Simplify the cmake for creating a test
Summary:
A dedicated cmake function is added to create a test case. It takes
a NAME, the SRCS and additional LIBS.

Thus it's
integrationTest(NAME myTestCase SRCS test.cpp)

to create a standard integration test.

In addition kwin_wayland_test.cpp is compiled into a static library
to decrease the compile time a little bit.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2052
2016-07-01 09:00:53 +02:00
Martin Gräßlin
055e2b3bb6 [autotests] Add a new test case which can verify the rendering of QPainter Scene
Summary:
The idea behind this autotest is inspired by bug 356328 which produced
incorrect rendering results. Also it's inspired by openQA which performs
image reference comparisons.

This test case tries to go further. It creates reference images which
must match the rendering result exactly. So far the test case verifies
the start condition - kwin started and one frame is rendered with default
cursor in the middle of the screen. And it verifies the moving of the
cursor without any windows shown. Whenever the cursor moves a repaint
should be triggered and the old and new area should be properly
repainted.

To support this the test needs some minor changes in KWin:
* Scene provides a frameRendered signal - needed for waiting on frame
* Scene and SceneQPainter are exported
* SceneQPainter provides access to it's Backend, so that we get to the
 backbuffer
* ScriptedEffectLoader is exported for getting a list of all scripted
 effects - (we don't want fade to manipulate the rendering)

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2046
2016-07-01 09:00:19 +02:00
Martin Gräßlin
d9d70cbaaf Find KF5Wayland together with other frameworks
CCBUG: 364928
2016-07-01 07:54:53 +02:00
l10n daemon script
ec764e32b6 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-06-30 13:06:15 +00:00
David Edmundson
ff3aced099 Update version number for 5.7.0
GIT_SILENT
2016-06-30 12:53:22 +01:00
Burkhard Lück
94e7adc53c killer/ moved to helpers/killer 2016-06-30 11:25:43 +02:00
l10n daemon script
f1cb59ee39 SVN_SILENT made messages (after extraction) 2016-06-30 08:01:47 +00:00