Commit graph

14662 commits

Author SHA1 Message Date
Martin Gräßlin
1d24264e45 [helpers/xclipboradsync] Ensure that KWayland::Client connects through the passed fd
One needs to call ConnectionThread::setSocketFd in order to not have it
connect through the normal socket.

As WAYLAND_SOCKET is set the implementation would call the correct
functionality anyway. This change only ensures that no wrong debug
message gets logged.
2016-06-29 19:13:00 +02:00
Martin Gräßlin
83dca5b524 Properly wait for client activated in XClipboardSyncTest::testSync
Test was failing on build.kde.org, though passing locally. This change
tries to make the test more robust to timing issues which makes it
hopefully pass on build.kde.org again.
2016-06-29 12:38:02 +02:00
Martin Gräßlin
e91f34f925 Drop warning regarding ksmserver in sm.cpp
Nobody complained that it doesn't work since the release of Plasma 5.
Thus let's assume that it works fine.
2016-06-29 11:06:24 +02:00
Martin Gräßlin
f9baa22f0d Fix unsigned-signed comparison with touch id in input.cpp
The id we internally have is a signed int and might be negative, but
the touch id we get is unsigned. We can savely cast the unsigned to
signed as touch ids are recycled and more than 10 touch points is
unlikely to be useful.
2016-06-29 11:03:43 +02:00
Martin Gräßlin
67f7e8da34 Drop static previous_client from Client::takeFocus
Only set but never read. The debug code for verifying was commented
out as it would no longer compile. Let's just get rid of it completely.
2016-06-29 10:55:20 +02:00
Martin Gräßlin
89b28c32da Correct datatype to qint64 for value returned from QElapsedTimer::elapsed
Was incorrectly passed to a quint64.
2016-06-29 10:52:43 +02:00
Martin Gräßlin
a64fd14f9a [effects/zoom] Remove unused variable 2016-06-29 10:51:47 +02:00
Martin Gräßlin
95449e0843 Fix unused parameter warnings 2016-06-29 10:50:51 +02:00
Martin Gräßlin
133a2f0c29 Move killer/ to helpers/killer
All helper binaries invoked from KWin go to helpers subdirectory.
2016-06-29 10:42:31 +02:00
Martin Gräßlin
50569a2580 Move tabbox/autotests to autotests/tabbox
Let's have all autotests in autotests subdirectory instead of spread
out over the source tree.
2016-06-29 10:38:17 +02:00
Martin Gräßlin
d6dd4af8cf Rename autotests/wayland to autotests/integration
It's not about Wayland, but more about Integration. It can test both
Wayland and X11 windows.

Reviewed-By: Bhushan Shah
2016-06-29 10:29:45 +02:00
Martin Gräßlin
aa215e12cc Expose the transientFor relationship to PlasmaWindowInterface
Test Plan: Compiles

Reviewers: #kwin, #plasma_on_wayland, hein

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D1780
2016-06-29 09:19:15 +02:00
Martin Gräßlin
c9984094de Add support for ToolTip Role on PlasmaSurface
Summary:
It's mapped to be on all desktops in order to properly have tooltips
show for the panel (which is on all desktops) instead of just on the
desktop it's created.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2032
2016-06-29 09:06:01 +02:00
Martin Gräßlin
3493e97655 Support for syncing the clipboard from X11 to Wayland and vice versa
Summary:
The clipboard sync is done by a dedicated helper binary launched by
KWin. This helper binary is forced to xcb platform to piggy-back on
Qt's implementation of the X11 clipboard. In addition it implements
the Wayland clipboard - which is much simpler. Reading the Wayland
clipboard is based on the implementation in QtWayland.

KWin internally knows the DataDeviceInterface belonging to the helper
application. Whenever an xwayland client is focussed, this DataDevice
is allowed to set the selection and KWin manually updates the current
selection in the SeatInterface. By that the sync from X11 to Wayland
is implemented. When afterwards a Wayland client is selected, it's sent
the current selection which references the X clipboard and a data
transfer can be initiated in the normal Wayland way.

For the other direction KWin sends the current selection to the helper's
DataDevice whenever an xwayland window is focused. The helper application
reads the Wayland clipboard and sets it on the X11 clipboard. Thus the
Wayland clipboard is synced to X11.

The approach used here will also be useful for implementing a clipboard
manager (aka klipper).

Currently the implementation is not yet fully completed. We need to
make sure that the helper application gets restarted in case of a crash.

Test Plan: See added test case

Reviewers: #plasma_on_wayland, #kwin

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D1973
2016-06-29 09:03:40 +02:00
Martin Gräßlin
4bc0c75df2 Merge branch 'Plasma/5.7' 2016-06-29 09:02:49 +02:00
Martin Gräßlin
f79c3f244d On Wayland never try to create a WindowPixmap from an X11 pixmap
Summary:
Our Wayland compositors cannot composite an X11 pixmap. Thus even
if we succeed in creating the pixmap, the changes would not get to
the scene. The code allowed for situation where a surface is not yet
set to fall back to the X11 code path. This can happen for XWayland
windows.

Test Plan: Crash in xclipboardsynctest without the change

Reviewers: #plasma_on_wayland, #kwin

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2010
2016-06-29 09:01:46 +02:00
Martin Gräßlin
758d41d6bf Paint the software cursor directly in SceneQPainter
Summary:
No need to delegate the painting of the software cursor into the backend.
The core has enough information to perform the rendering itself.

This change means less code duplication and all platforms which might use
a software cursor in QPainter compositor gain support for it without any
further adjustments.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2028
2016-06-29 08:50:46 +02:00
Martin Gräßlin
23fb02cce2 Render cursor in multi-screen setup in QPainter Compositor
Summary:
The call to render the cursor was missing in the multi-screen code path
of the QPainter Compositor.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2027
2016-06-29 08:49:46 +02:00
Martin Gräßlin
7ea84cd346 [platforms/drm] If mapping a DrmBuffer for a cursor fails, fallback to software cursor
Summary:
So far the drm platform did not verify whether creating and mapping a
DrmBuffer for a cursor works. This could result in a crash in the worst
case.

This change verfies whether mapping the two cursor buffers works, if
not software cursor is enabled. The code is adjusted to ensure that
none of the cursor buffers is accessed in case software cursor are
enabled.

Please note that right now the drm platform's rendering does not
support software cursors. Thus currently this change results in no
cursor at all. This will be addressed by following patches.

BUG: 364740
FIXED-IN: 5.7

Test Plan:
Verfied that it properly falls back to software cursor,
but could not verify that the crash is actually fixed.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2026
2016-06-29 08:49:17 +02:00
Martin Gräßlin
feadcea6ce [platforms] Call setSoftWareCursor in init instead of ctor
Summary:
Platform::setSoftWareCursor creates connections to the Cursor in order
to trigger repaints whenever the cursor position changes. The Cursor is
created before Platform::init is called, but after the Platform is
created. Thus the call needs to happen in init, otherwise the cursor
is not rendered correctly.

BUG: 356328
FIXED-IN: 5.7.0

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2025
2016-06-29 08:48:24 +02:00
Martin Gräßlin
fd19db0fbe Properly clip the damage region and windows in SceneQPainter
Summary:
On the framebuffer backend the software rendered cursor was creating
rendering artifacts due to incorrect clipping. This change ensures that
in a single screen setup the clipping is performed correctly. For multi
screen a similar change might be required, but we currently don't have
any a way to test that as framebuffer only supports one screen and other
(visual) platforms don't support the software cursor.

CCBUG: 356328

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2024
2016-06-29 08:47:58 +02:00
Martin Gräßlin
d19f9a96b4 Merge branch 'Plasma/5.7' 2016-06-29 08:36:44 +02:00
Martin Gräßlin
3c6dff75d5 Stop composite timer when Workspace gets destroyed
On Wayland tear down the Workspace gets destroyed before the Compositor
gets destroyed. If the timer fires in that area, the Compositor would
crash. It's not possible to start the timer if the Workspace is
destroyed, thus it should also be stoped on Workspace destroy.

Reviewed-By: Bhushan Shah
2016-06-29 08:34:10 +02:00
Bhushan Shah
3ec8e5ce75 Remove completely useless output
This was being repeated everytime a window is created/resized/closed.

Reviewed-by: Martin Gräßlin <mgraesslin@kde.org>
2016-06-29 11:56:18 +05:30
Bhushan Shah
a69b47f7b7 [autotests] Extend StrutsTests for setup on mobile
This testcase tries to emulate the panel setup on the phone,

- Window placement strategy is set to maximizing
- Top panel with height of 60
- Bottom panel with height of 150

However this is still not complete testcase, some todo items:

- Create Plasmashell desktop window before creating panels
- Create normal window and verify if its placement/position is right

Reviewed-by: Martin Gräßlin <mgraesslin@kde.org>
2016-06-28 16:53:35 +05:30
Martin Gräßlin
1a779ccd88 Merge branch 'Plasma/5.7' 2016-06-28 12:43:36 +02:00
Martin Gräßlin
736d99fc6a Properly trigger repaint for sofware cursor
Summary:
When the cursor changes the old and the new cursor geometry needs to
be repainted. Also when the cursor image changes a repaint of old and
new geometry is needed.

To support this the current cursor geometry is tracked instead of just
the cursor position. From the cursor position it's not possible to get
to the cursor geometry once the cursor image or hotspot changes, thus
the complete geometry needs tracking.

CCBUG: 356328

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2023
2016-06-28 12:40:38 +02:00
Martin Gräßlin
9355d605a0 Drop specifying the default debug areas
Summary: Relict from KDebug times.

Test Plan: Compiles

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D1981
2016-06-28 11:37:22 +02:00
Martin Gräßlin
c81d8204f9 Add support for new Notification role on PlasmaSurface
Summary:
Sets notifications on all desktop and doesn't activate them.

Unfortunately doesn't work on Plasma yet. Seems the windows don't get
tagged properly.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D1930
2016-06-27 11:47:50 +02:00
Martin Gräßlin
7adf69dece Update Keyboard focus when the Surface of the active client changes
Summary:
For XWayland windows the window might be activated before the Wayland
Surface is set for it. Thus the keyboard focus is not passed to the
window. Only on the next activate after the window got created the
window got keyboard focus.

This change addresses this problem by emitting a signal from Toplevel
when the surface changes. The KeyboardInput listens to this signal
for the active client and updates keyboard focus again if the surface
changes. Thus keyboard focus is properly passed to XWayland windows.

Test Plan:
Test case which creates an X11 window is adjusted to verify
the condition.

Reviewers: #plasma_on_wayland, #kwin

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2009
2016-06-26 16:07:31 +02:00
Martin Gräßlin
a97d438b6c Merge branch 'Plasma/5.7' 2016-06-25 15:58:23 +02:00
Martin Gräßlin
b487da02cd Install a signal handler for SIGABRT and SIGSEGV for kwin_wayland
Summary:
kwin_wayland disables ptrace on itself. This has the side effect of
core dumps no longer be created - which we want as DrKonqi doesn't
work for kwin_wayland.

This change introduces a dedicated signal handler for abort and
segfault. The signal handler enables ptrace again, unsets itself as
signal handler and raises the signal again, so that the proper crash,
abort handling can be performed.

Test Plan:
Added a crash, added an abort and verified that coredumpctl
shows the expected coredump.

Reviewers: #plasma_on_wayland, #kwin, bshah

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2003
2016-06-25 15:57:43 +02:00
l10n daemon script
c240755dee 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-23 23:41:42 +00:00
l10n daemon script
8b1a5f27df 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-23 21:12:32 +00:00
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
bdf555bbcb 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 20:59:43 +02:00
Martin Gräßlin
c90f3bd37b Merge branch 'Plasma/5.7' 2016-06-23 11:49:26 +02:00
Martin Gräßlin
02ba1e7c0a Don't crash if a decoration doesn't get created
Summary:
With the NoBorder option set the DecorationBridge won't create
decorations. Thus we get a nullptr and obviously should not call
into it. There was already a check for whether decoration is null,
so that is a rather embarrassing bug.

Test Plan: Test case added which exposes the crash

Reviewers: #plasma_on_wayland, #kwin

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D1980
2016-06-23 11:28:08 +02:00
l10n daemon script
344650fe5d 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-21 10:41:58 +00:00
Martin Gräßlin
5ecec4e42c Merge branch 'Plasma/5.7' 2016-06-20 17:02:52 +02:00
Martin Gräßlin
c211268b35 Verify that windowPixmap<>() does not return a nullptr before accessing the children
windowPixmap() is allowed to return a nullptr, thus we need to verify
that the returned pointer is not null. If it is null it's the same as
if there are no child WindowPixmaps.
2016-06-20 17:01:15 +02:00
Martin Gräßlin
6c7205fb21 Merge branch 'Plasma/5.7' 2016-06-20 11:22:40 +02:00
Martin Gräßlin
a1f21f3cea Drop not needed include to sys/sysmacros.h from logind.cpp
Fixes build on FreeBSD.
2016-06-20 11:21:45 +02:00
l10n daemon script
a22e3254ec 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-19 12:57:39 +00:00
l10n daemon script
5e205d2682 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-19 09:54:27 +00:00
l10n daemon script
2f1014555c 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-17 13:26:16 +00:00
Martin Gräßlin
3f08599050 Merge branch 'Plasma/5.7' 2016-06-17 09:27:01 +02:00
Martin Gräßlin
8a85cc5f9c Do not activate on-screen-display windows
Summary:
Plasma's OSD windows were stealing focus on Wayland. We can be sure
that they should not get keyboard focus, so a check to acceptsFocus
is added.

Reviewers: #plasma_on_wayland, #kwin

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D1927
2016-06-17 09:26:15 +02:00
Martin Gräßlin
74f98d4c12 Cache the caption of ShellSurface in ShellClient
Summary:
If the ShellSurface gets destroyed while a decoration repaint is pending,
it is possible that on tear down the decoration calls into
ShellClient::caption. This used to call into ShellSurfaceInterface::title
which accesses a d-ptr which is already destroyed at that point.

This change caches the caption instead of delegating to ShellSurface,
just like almost everything else caches. Thus the tear down cannot access
invalid memory.

Once we can depend on Frameworks 5.24, we should also make sure to
connect to the new Resource::unbound signal to be able to handle tear
down prior to the object being completely deleted.

Test Plan:
Unfortunately no test case as this depends on phase-of-moon
aligning of destruction of the interfaces

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D1913
2016-06-17 08:34:37 +02:00
David Edmundson
270fca6a93 Update version number for 5.7.90
GIT_SILENT
2016-06-16 14:39:08 +02:00