Commit graph

15595 commits

Author SHA1 Message Date
Jonathan Riddell
7dabf22300 bump version number again 2017-06-12 11:13:05 +01:00
Roman Gilg
7ed8323cf8 Merge branch 'Plasma/5.10' 2017-06-12 01:30:34 +02:00
Roman Gilg
2f8cc2aa75 [platforms/drm] Make Atomic Mode Setting the new default
With the recent patches AMS should be stable enough for daily use. It was
tested by several people in the last week without reporting back any problems.
So make it the new default on master.

Leave an env variable for now to deactivate it, in case something bad happens.

Reviewers: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5934
2017-06-12 01:26:16 +02:00
Rohan Garg
b3247539e4 [DRM plugin] Remove dead code
Reviewed-By: Roman Gilg <subdiff@gmail.com>
2017-06-12 01:24:17 +02:00
Eike Hein
e7e79124aa Set pid on the ClientConnection backing the PlasmaWindow surface.
Summary: Depends on D5747.

Reviewers: #plasma, sebas, graesslin

Reviewed By: #plasma, graesslin

Subscribers: kwin, plasma-devel, #kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D5756
2017-06-12 01:09:22 +02:00
Oleg Chernovskiy
d8ec2e0466 Make kwin_wayland remotely debuggable
Differential Revision: https://phabricator.kde.org/D6160
2017-06-11 22:17:27 +03:00
l10n daemon script
155b6ecb3b 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"
2017-06-11 04:45:20 +02:00
l10n daemon script
1112188a8b 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"
2017-06-10 05:41:19 +02:00
l10n daemon script
e3024908f5 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"
2017-06-10 04:29:59 +02:00
Jonathan Riddell
6d9a7142e5 Update version number for 5.10.1
GIT_SILENT
2017-06-06 11:42:40 +01:00
David Edmundson
5091feb8f6 Fix Aurorae decorations with non integer DPI
Summary:
As noted by Thomas L we're casting the scaleFactor to an int far too
early, which in the worst case means we end up with Aurorare themes not
rendering.

This moves the rounding to where it's used per border.

BUG: 380524

Test Plan:
Forced Xft.DPI to 95 with xrdb. Confirmed that it was broken
Applied this patch. Got decoration again

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: mart, rikmills, plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6099
2017-06-05 10:50:01 +01:00
l10n daemon script
85ede03a57 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"
2017-06-04 05:39:14 +02:00
Jonathan Riddell
c5861b99eb Update version number for 5.10.0
GIT_SILENT
2017-05-25 19:30:36 +01:00
l10n daemon script
2a6048c885 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"
2017-05-25 05:40:47 +02:00
l10n daemon script
67ab6d9b31 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"
2017-05-23 05:54:25 +02:00
l10n daemon script
0f66fa648f 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"
2017-05-22 05:32:13 +02:00
l10n daemon script
30113e72b7 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"
2017-05-14 05:28:03 +02:00
David Faure
bddde8d78e Fix compilation without libinput. #if is used everywhere else, #ifdef is wrong. 2017-05-13 12:05:33 +02:00
l10n daemon script
2281bd19d8 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"
2017-05-13 05:59:44 +02:00
Martin Flöser
6a4e9cbb58 Merge branch 'Plasma/5.9' into Plasma/5.10 2017-05-12 07:08:04 +02:00
Martin Gräßlin
229be65e40 Improve the escape key handling for breaking constrained pointers
Summary:
So far KWin started to filter out the escape key as soon as it gets
pressed. This was done by unsetting keyboard focus. The idea was to
reset keyboard focus when it is only a short press and that then the
keyboard state is correct for the application. But in practice this
does not work. The only application currently supporting pointer
constraints (Xwayland) does not do anything on a key which is pressed
when gaining keyboard focus. The result is escape not working in
pointer constrained Xwayland windows.

This change addresses this problem by changing the interaction to only
unset keyboard focus when our break constraints condition is met. This
should also result in the application not handling the key release, but
it means it gets the key press. Unfortunately I don't have a good way
to test.

BUG: 378452

Test Plan: None

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5488
2017-05-12 07:06:44 +02:00
l10n daemon script
7a14a0ef4d 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"
2017-05-12 05:44:57 +02:00
Roman Gilg
9334d0ac48 [DRM plugin] No forward declare of DrmSurfaceBuffer without GBM
This fixes a compilation error introduced with efedddd905, which
forward declared the DrmSurfaceBuffer class also on builds without GBM.

BUG: 379732
2017-05-11 23:53:24 +02:00
Eike Hein
6607bd72f2 Use resourceClass as fallback for XWayland clients instead of resourceName.
Summary:
resourceClass is the more useful half of WM_CLASS. It's what modern X
clients are supposed to set to a .desktop file name, which is closer to
the semantics of appId than resourceName.

Reviewers: #plasma, graesslin

Subscribers: kwin, plasma-devel, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5815
2017-05-12 02:18:44 +09:00
Jonathan Riddell
6d1b61c1a7 Update version number for 5.9.95
GIT_SILENT
2017-05-11 14:38:49 +01:00
David Edmundson
e63a25515a List both setup and monitor UUIDs in debug
Summary:
I keep having to re-add this patch locally to see which config is
actually in play.

Test Plan: Compiles

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5795
2017-05-11 12:08:03 +02:00
l10n daemon script
1d8b61deb4 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"
2017-05-11 04:19:45 +02:00
Rohan Garg
3817eddfc6
m_clientSize is already connected in ShellClient::init
Summary:
TODO no longer applies since ShellClient::init already connects
SurfaceInterface::sizeChanged to update m_clientSize

Test Plan

Subscribers: kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5787
2017-05-10 10:52:19 +02:00
l10n daemon script
52b21b1142 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"
2017-05-10 08:51:09 +02:00
l10n daemon script
9ad87d3909 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"
2017-05-10 07:42:38 +02:00
Roman Gilg
d15cb52682 [DRM plugin] Correct Atomic Mode Setting
This patch makes the AMS execution path work with the new DrmCrtc and
DrmBuffer structure and solves major issues about:
* VT switching
* DPMS
* Hot plugging
* Logout
* Memory leaks

Test Plan:
Tested with Gl and QPainter.

Reviewers: #kwin

Subscribers: kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5191
2017-05-09 21:29:10 +02:00
Roman Gilg
efedddd905 [DRM plugin] Reorganize DrmBuffer
Split off GBM based buffers to a separate file, which gets only included,
when GBM is available.

Note, that this also removes the gbmCallback, since already before this
patch we did delete the buffers always without it.

The plan is to later use this file for via GBM directly imported Wayland
buffers as well.

Test Plan:
Tested with Gl and QPainter backends.

Reviewers: #kwin

Subscribers: kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5179
2017-05-09 21:00:33 +02:00
Roman Gilg
a0571ccf84 [DRM plugin] Remember static kernel objects, amplify use of DrmCrtc
To get an image from KWin to the screen in the DRM pipeline we combine a CRTC,
an encoder and a connector. These objects are static in the sense, that they
represent real hardware on the graphics card, which doesn't change in a
session. See here for more details:
https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-kms.html

Until now we used DrmOutput as the main representation for such an active
rendering pipeline. I.e. it gets created and destroyed on hot plug events of
displays. On the other side we had no fixed representation of the static kernel
objects throughout the lifetime of KWin. This has several disadvantages:
* We always need to query all available static objects on an hot plug event.
* We can't manipulate the frame buffer of a CRTC after an output has been
  disconnected
* Adding functionality for driving multiple displays on a single CRTC (i.e.
  cloning) would be difficult
* We can't destroy the last frame buffer on display disconnect because the CRTC
  still accesses it and have therefore a memory leak on every display disconnect

This patch  solves these issues by storing representations of all available CRTC
and Connector objects in DrmBackend on init via DrmCrtc and DrmConnector
instances. On an hotplug event these vectors are looped for a fitting CRTC and
Connector combinations. Buffer handling is moved to the respective CRTC
instance. All changes in overview:
* Query all available CRTCs and Connectors and save for subsequent hotplug
  events
* Fix logic errors in `queryResources()`
* Move framebuffers, buffer flip and blank logic in DrmCrtc
* Remove `restoreSaved()`. It isn't necessary and is dangerous if the old
  framebuffer was deleted in the meantime. Also could reveal sensitive user
  info from old session.

Test Plan:
Login, logout, VT switching, connect and disconnect external monitor, energy
saving mode.

Reviewers: #kwin

Subscribers: kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5118
2017-05-09 20:23:43 +02:00
Luboš Luňák
750843061c fix showing of window on inactive activities during session save
This is what 7ce380497f tried to do (and got reverted by my previous commit).
The approach is basically the same, just temporarily fake that the window
is on all activities, thus it will be temporarily shown for the session
interact, but this time there seem to be no broken side-effects (and if there
are, they'll be at least limited to activities and not break virtual desktops).
Also, 'needsSessionInteract' was a misnomer - it certainly wasn't set for all
windows that needed session interaction. Just call it what it really is.

Differential Revision: https://phabricator.kde.org/D5614
2017-05-09 18:56:16 +02:00
Luboš Luňák
f4de9618f8 revert the hackish overriding of Client::desktop() for session saving
The member variable is not what determines which desktop a window is on,
it's more like caching the state. Therefore trying to fake a new value
eventually leads to inconsistencies, e.g. having KWrite open with unsaved
changes on inactive desktop results in the window ending up on all desktops
after session save (both successful and cancelled).
This pretty much reverts the whole 7ce380497f that introduced this and also
a0a976885c that tried to fix some of the problems resulting from it.
The original problem of session saving of windows of inactive activities still
remains, to be fixed by another commit.

Differential Revision: https://phabricator.kde.org/D5613
2017-05-09 18:55:18 +02:00
Martin Flöser
a2d19c6b9d Revert "Set pid on the PlasmaWindow based on the client connection."
This reverts commit 262fb00b51.

CCMAIL: hein@kde.org
2017-05-08 16:46:16 +02:00
Martin Flöser
802b0de36a Revert "Fix typo in API comment."
This reverts commit ac02f778a2.
2017-05-08 16:46:06 +02:00
Eike Hein
ac02f778a2 Fix typo in API comment. 2017-05-08 19:27:09 +09:00
Eike Hein
262fb00b51 Set pid on the PlasmaWindow based on the client connection.
Summary: Depends on D5747.

Test Plan:

Reviewers: #plasma,sebas,graesslin

Subscribers: plasma-devel
2017-05-08 19:25:54 +09:00
David Edmundson
55933d9cc9 Update min KF5 version 2017-05-08 12:22:09 +02:00
l10n daemon script
8e237862fe 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"
2017-05-08 04:17:12 +02:00
David Edmundson
fe231be5e2 Keep all touchpad QActions in the main thread
Summary:
Making QActions with the Connection as a parent is dangerous as it gets
moved to a new thread, moving all child objects to that thread.

KGlobalAccel and QAction aren't thread safe and we shouldn't be using it
in two threads. This was notably seen when runnng invokeShortcut over
DBus which then invokes it on the main thread. Something my laptop was
doing when I closed the lid.

This patch simply moves the code to the Input class, where we set up the
libinput connection.

Test Plan:
Closed lid, kwin_wayland was still there when I resumed
Set manual shortcut for toggling touchpad, that still worked

Reviewers: #plasma

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5733
2017-05-07 16:08:00 +02:00
Martin Flöser
c555cf3956 Merge branch 'Plasma/5.9' 2017-05-07 09:38:52 +02:00
Martin Flöser
5c827743ea Merge branch 'Plasma/5.8' into Plasma/5.9 2017-05-07 09:38:02 +02:00
Martin Flöser
32939fa7b5 Fix regression for timestamp handling for Xwayland windows
Summary:
Change 0bec9ad733 introduced a regrssion
on Wayland. On Wayland getTimestamp always returns 0, thus the X11
timestamp gets reset again and again. This results in broken interaction
for Xwayland windows as the broken unit tests show.

This change addresses the regression by ignoring a value of 0.
It means the addressed bug is still present on Wayland for X11 windows
as the timestamp doesn't get updated properly. This requires further
changes.

Test Plan: TestShade works again, testX11TimestampUpdate still works

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5731
2017-05-06 19:54:08 +02:00
Martin Gräßlin
572f730e8e [helper] Terminate xclipboardsyncer if kwin_wayland goes down
Summary:
Normally the xclipboardsyncer should terminate because the socket
becomes unusable. But we have reports of it not really going down and
running amok.

In order to prevent such situations this change registers SIGTERM to be
sent to xclipboardsyncer when the parent process (that is kwin_wayland)
dies in whatever way. This ensures that xclipboardsyncer cannot become
an orphan.

BUG: 371862

Test Plan: Only compile tested, no way to get into the problematic situation

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5589
2017-05-05 19:17:11 +02:00
Martin Gräßlin
c3e2ea6c21 Merge branch 'Plasma/5.9' 2017-05-05 19:16:38 +02:00
Martin Gräßlin
cacfdf3676 Merge branch 'Plasma/5.8' into Plasma/5.9 2017-05-05 19:14:10 +02:00
Martin Gräßlin
0bec9ad733 Improve the x11 timestamp handling
Summary:
So far KWin only updated the x11 timestamp if the new timestamp is larger
than the existing one. While this is a useful thing it creates problems
when the 32 bit msec based time stamp wraps around which happens after
running an X server for 49 days. After the timestamp wrapped around KWin
would not update the timestamp any more and thus some calls might fail.
Most prominent victims are keyboard and pointer grab which fails as the
timestamp is either larger than the server timestamp or smaller than the
last grab timestamp.

Another problem related to timestamp handling is KWin getting broken by
wrong timestamps sent by applications. A prominent example is clusterssh
which used to send a timestamp as unix time which is larger than the
x timestamp and thus our timestamp gets too large.

This change addresses these problems by allowing to reset the timestamp.
This is only used from updateXTime (which is normally invoked before we
do things like grabKeyboard). Thus we make QX11Info::getTimestamp the
ultimate trusted source for timestamps.

BUG: 377901
BUG: 348569
FIXED-IN: 5.8.7

Test Plan: As I cannot wait 50 days: unit tests for the two conditions added.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5704
2017-05-03 21:36:34 +02:00
Martin Gräßlin
b221d529a2 [autotests] Fix touch screen edge test after setting a default
Changes the config mocking to not have an action on the left edge which
conflicts with the test condition.
2017-05-02 21:17:41 +02:00