Commit Graph

730 Commits (bc1991706c66a53f970fdcd576bcb35e70c9b7f1)

Author SHA1 Message Date
Aleix Pol 3a9d7a6e9d Port KWin to KWaylandServer
Summary: Away from KWayland::Server and KF5WaylandServer.

Test Plan: Builds, ran nested session

Reviewers: #kwin, #plasma, #frameworks, davidedmundson, zzag

Reviewed By: #kwin, #plasma, davidedmundson, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29278
2020-04-30 12:56:08 +02:00
Vlad Zahorodnii 76af96bcc9 [x11] Disable synchronized resizing for Xwayland < 1.21
In case Xwayland does not use multiple buffers, the currently attached
buffer is going to be destroyed if the frame window is resized. It may
render the previous and the current window pixmap invalid and thus result
in visual artifacts when an X11 client is being interactively resized.

In order to avoid the visual artifacts, this change disables support for
synchronized resizing for X11 clients if the version of Xwayland is less
than the version in which Xwayland started using multiple buffers, i.e.
1.21.

Differential Revision: https://phabricator.kde.org/D29250
2020-04-29 16:37:31 +03:00
Vlad Zahorodnii a9d2bad007 [x11] Enable synchronized resizing for Xwayland clients
Given that we now query the current X11 time stamp on Wayland, we can
enable synchronized resizing for Xwayland clients.

Differential Revision: https://phabricator.kde.org/D29250
2020-04-29 16:37:23 +03:00
Nate Graham f9faa94ccc [kcmkwin/kwinrules] Port placeholder message to Kirigami.PlaceholderMessage
Summary: Depends on D29152

Test Plan:
{F8256396}

{F8257685}

Reviewers: iasensio, #kwin, zzag

Reviewed By: iasensio, #kwin, zzag

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T13021

Differential Revision: https://phabricator.kde.org/D29141
2020-04-24 08:30:07 -06:00
Jonathan Riddell 08a21ae7b6 bump to require Qt 5.14 2020-04-02 15:22:36 +01:00
Aleix Pol da2d896257 Fix for older cmake versions
Summary: Recent changes prevented it to build on KDE Neon.

Test Plan: Built it on Neon

Reviewers: #kwin, bshah, davidedmundson

Reviewed By: #kwin, bshah, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28511
2020-04-02 13:20:03 +02:00
Aleix Pol dbac4bce7e Reduce the amount of objects that are compiled several times
Summary:
We build some objects several times which makes it uncomfortable to develop KWin
since every time we modify something a lot of things get rebuilt. This should
help a bit although it doesn't solve all the problems.

Test Plan: Builds, tests pass

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: davidedmundson, zzag, anthonyfieroni, iasensio, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28445
2020-04-02 00:41:55 +02:00
Aleix Pol e0052cedcb Implement the tablet wayland protocol in kwin
Summary:
Uses the tablet classes introduced in kwayland.
Depends on D26858

Test Plan:
Scratched my tablet with a magic stick and it did things depending on the pressure.
https://youtu.be/GGx0TlNJlzs

Reviewers: #kwin, #plasma, zzag, davidedmundson

Reviewed By: #kwin, #plasma, zzag, davidedmundson

Subscribers: davidedmundson, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26859
2020-03-20 03:05:41 +01:00
Méven Car d571457bbe KCM/Kwinoptions: Port title bar and window actions tabs UI and conf to KConfigXT
Summary: Depends on D27463

Reviewers: crossi, bport, ervin, #kwin, zzag

Reviewed By: ervin, #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27477
2020-03-19 12:40:01 +01:00
Daniel Vrátil 9bd91e66cd
fix: make hwdata truly a runtime dependency
Summary: Followup to comments in D10041

Reviewers: #plasma, ngraham, davidedmundson, zzag

Reviewed By: #plasma, ngraham, davidedmundson, zzag

Subscribers: iasensio, wstephenson, davidedmundson, zzag, ngraham, kwin, cgiboudeaux

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27729
2020-03-17 15:39:17 +01:00
Aleix Pol 54c6acadf2 Allow building with Qt 5.12 2020-03-17 15:32:20 +01:00
Aleix Pol cca0e15b45 Fix compiler warnings
Summary: No need to keep them around for no reason.

Test Plan: Tested the plugins I thought could be affected. Have been using it for a couple of days without problems

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28062
2020-03-17 15:07:52 +01:00
Henri Chain 7c1c9d8164 Port kwinrules kcm to kconfigxt
Reviewers: meven, crossi, bport, ervin, #kwin

Subscribers: iasensio, ognarb, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27682
2020-03-16 13:21:43 +01:00
Roman Gilg 2c66e1f690 Remove orientation sensor
Summary:
This functionality will instead be implemented in KScreen such that manual and
automatic output rotation can be used and configured through a single UI in
unison together.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin, bshah, davidedmundson, zzag

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26036
2020-02-29 09:59:30 +05:30
Daniel Vrátil 33a1777a5a
Decode full monitor vendor name from EDID using hwdata
Test Plan:
KScreen now shows "Dell Inc." instead of DEL and
"Eizo Nano Corporation" instead of ENC in output names, which
matches closer to what's written on my monitors.

Reviewers: graesslin, davidedmundson, #plasma

Reviewed By: davidedmundson, #plasma

Subscribers: apol, feverfew, ngraham, davidedmundson, mart, kwin, sebas

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D10041
2020-02-26 12:37:11 +01:00
Heiko Becker 7d8a7e701b Merge remote-tracking branch 'origin/Plasma/5.18' 2020-02-08 14:12:47 +01:00
Heiko Becker 6d8f3732c1 Require kdecoration >= 5.18.0
Summary:
To successfully build kwin needs 13e6459a3baeebe6a7b594efd995b88f6dd7524e
in kdecoration. Otherwise it fails with: "previewclient.h:93:11: error:
'QSize KDecoration2::Preview::PreviewClient::size() const' marked
'override', but does not override QSize size() const override;"
So this is not a new requirement but just an update to the build system
to reflect the actual requirements.

Test Plan: Builds fine with the newly required version

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27242
2020-02-08 13:38:22 +01:00
Jonathan Riddell e70b30d572 Update version number for 5.18.0
GIT_SILENT
2020-02-06 12:52:26 +00:00
Vlad Zahorodnii 03ae441e23 Change project name to "KWin"
Summary: It's not "KWIN" nor "kWin" nor "kWIN" nor "kwin"

Test Plan: Qt Creator displays "KWin" with correct capitalization.

Reviewers: #kwin, meven

Reviewed By: meven

Subscribers: apol, meven, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26500
2020-01-25 03:05:02 +02:00
David Edmundson 996e840172 Drop kdeinit linking
Summary:
This wasn't used on startup (ksmserver calls KProcess)
Nor for the rules dialog (kwin invokes it with QProcess)

We may as well simplify the code and drop the dependency

See also T12140

Test Plan:
Restarted
Opened the rules dialog

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26835
2020-01-22 12:46:10 +00:00
Jonathan Riddell 632d2182c3 Update version number for 5.18.80
GIT_SILENT
2020-01-16 13:14:38 +00:00
Jonathan Riddell c7967e25c3 Update version number for 5.17.90
GIT_SILENT
2020-01-16 12:00:23 +00:00
Jonathan Riddell 5e6266903a KF5_MIN_VERSION for plasma 5.18 is KF5 5.66.0 2020-01-16 11:31:50 +00:00
Vlad Zahorodnii fbfd1ac705 Split geometry topic file
Test Plan: Compiles.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26644
2020-01-16 12:22:21 +02:00
Vlad Zahorodnii e728460ac6 [nightcolor] Use a dedicated class for detection of system clock changes
Summary:
The ClockSkewNotifier provides a convenient way for monitoring system
clock changes. One of the key ideas was to hide platform details from
users of the class. This allows us to add a QTimer fallback path for
operating systems that don't provide anything to detect system clock
changes.

In long term, I would like to move the new class to Frameworks.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25962
2020-01-07 17:12:14 +02:00
Aleix Pol f5a73b87e3 Initial support for tablets on Wayland
Summary:
This includes support for them on libinput and turns it into fake
pointer actions.
This doesn't implement zwp_tablet, this will have to happen in an
iteration later.

Test Plan:
Been playing around with it, see video.
https://www.youtube.com/watch?v=GF1WbO8FVvU

Reviewers: #plasma, #kwin, romangg

Reviewed By: #plasma, #kwin, romangg

Subscribers: zzag, davidedmundson, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25663
2019-12-10 21:56:31 +01:00
Vlad Zahorodnii 30c14d6e43 Merge manage.cpp with x11client.cpp
Test Plan: Compiles.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T12312

Differential Revision: https://phabricator.kde.org/D25712
2019-12-03 17:52:58 +02:00
Yuri Chornoivan 84244a7cf6 Use URL with transport encryption 2019-11-26 19:39:20 +02:00
David Edmundson 34bfc49189 adjust cmake include order 2019-11-05 10:53:13 +00:00
David Edmundson 0369011c23 Add KDEClangFormat cmake support
Summary:
This allows devs to run: "make clang-format" and format all files easily
using the preset KDE clang format style

This patch adds support so devs can easily test the intended formatting
now, it doesn't change the code yet.

Doing an initial run to commit everything will happen later.

Test Plan:
Ran script
git diff was full of amazingly cleaned code

See D25134
2019-11-04 23:44:34 +00:00
David Edmundson ec610fd7ed Port one of session management connections state to a custom API
Summary:
Currently kwin opens a second ICE connection to ksmserver in order to
tell the state of kwin's whether we're logging out and saving clients or
not.

This requires that kwin launches after ksmserver to have the connection
which is a dependency I want to break.

Practically this code is already ksmserver specific as it relies on some
custom code that sends the first saveState request to kwin first.

Instead we can replace it with a bespoke IPC over DBus and siplify the
code both end. This will allow several other future enhancements that we
want with regards to handling the session state, as well as make an
effort platform agnostic session management, as well as cleaning up some
complex code.

Ksmserver calls into kwin, rather than having kwin watch ksmserver state
to allow us make sure it's race free.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: romangg, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24862
2019-11-01 17:14:42 +00:00
Roman Gilg affd444507 Merge branch 'Plasma/5.17' 2019-10-29 12:12:02 +01:00
Roman Gilg 7459aabcac Dmabuf recovery on EGL reset
Summary:
The EGL platform might go away at any time through reconfiguration or because
of a graphic error. KWin then resets the graphics. The dmabuf implementation
must respect that and recover from a graphics reset by recreating all EGL
images for existing buffer.

This assumes that we won't change our graphics API mid-session and that
supported plane and modifier configuration stays constant.

In practise we remember all current dmabufs in a single map and only remove
them if the client did destroy the resource.

BUG: 411980
CCBUG: 413403
FIXED-IN: 5.17.2

Test Plan: Applied screenedge configuration without crash.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: fvogt, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24954
2019-10-29 12:10:15 +01:00
Jonathan Riddell 7c58a1dc94 Update version number for 5.17.1
GIT_SILENT
2019-10-22 15:39:47 +01:00
Jonathan Riddell 549517293f Update version number for 5.17.0
GIT_SILENT
2019-10-10 12:57:14 +01:00
Jonathan Riddell 9854b9bee5 Update version number for 5.17.80
GIT_SILENT
2019-10-10 12:45:18 +01:00
Jonathan Riddell 27d72437cf Update version number for 5.17.0
GIT_SILENT
2019-10-10 12:40:12 +01:00
Vlad Zahorodnii ffcbe24e2b Rename Client to X11Client
Summary:
Currently each managed X11 client is represented with an instance of
Client class, however the name of that class is very generic and the
only reason why it's called that way is because historically kwin
was created as an x11 window manager, so "Client" was a sensible choice.

With introduction of wayland support, things had changed and therefore
Client needs to be renamed to X11Client in order to better reflect what
that class stands for.

Renaming of Client to X11Client was agreed upon during the last KWin
sprint.

Test Plan: Compiles, the test suite is still green.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24184
2019-09-25 21:11:37 +03:00
Vlad Zagorodniy 168ea98845 Rename ShellClient to XdgShellClient
Summary:
Rename ShellClient to XdgShellClient in order to reflect that it
represents only xdg-shell clients.

Test Plan: Compiles, tests still pass.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23589
2019-09-23 17:28:56 +03:00
Jonathan Riddell fdf98d6c19 Update version number for 5.17.80
GIT_SILENT
2019-09-19 15:29:30 +01:00
Jonathan Riddell 48691c406e Update version number for 5.16.90
GIT_SILENT
2019-09-19 10:04:51 +01:00
Vlad Zahorodnii 09b47b5250 Undo some recent cmake changes
Unfortunately linking can be very fragile so let's not break things.
2019-09-18 13:50:52 +03:00
Vlad Zahorodnii dcf91d4321 Cleanup style in CMakeLists.txt files
We have lots of inconsistency at the moment in CMakeLists.txt files. Most
of it is due to kwin being a very old project. This change hopefully fixes
all of it.
2019-09-17 16:03:05 +03:00
Vlad Zahorodnii c8aa258eba Keep things sorted alphabetically in CMakeLists.txt
Summary:
Currently component names and filenames are partially sorted. This makes adding
new items and finding existing items more difficult.

Test Plan: Compiles.

Reviewers: #kwin, gladhorn

Reviewed By: #kwin, gladhorn

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24018
2019-09-17 11:43:26 +03:00
Frederik Gladhorn b64e67ce7c Remove disabled TabGroup feature
Summary:
This has been commented out since 2014, I doubt it will come back.
This is a big amount of code, maintenance will be easier without it.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: romangg, graesslin, kwin

Tags: #kwin, #documentation

Differential Revision: https://phabricator.kde.org/D23069
2019-09-14 10:58:48 +02:00
Nate Graham 0f17d9ebf2 [kcmkwin/kwineffects] Use new Kirigami ListSectionHeader component
Summary:
This allows all the section headers to always have the same look and feel and be
adjusted in just one place.

Depends on D23049

Test Plan: {F7181776}

Reviewers: #vdg, kwin, GB_2, #kwin

Reviewed By: #vdg, GB_2

Tags: #kwin

Maniphest Tasks: T10384

Differential Revision: https://phabricator.kde.org/D23055
2019-09-07 20:31:51 -06:00
Vlad Zagorodniy 8af2fa73dc Run clang-tidy with modernize-use-override check
Summary:
Currently code base of kwin can be viewed as two pieces. One is very
ancient, and the other one is more modern, which uses new C++ features.

The main problem with the ancient code is that it was written before
C++11 era. So, no override or final keywords, lambdas, etc.

Quite recently, KDE compiler settings were changed to show a warning if
a virtual method has missing override keyword. As you might have already
guessed, this fired back at us because of that ancient code. We had
about 500 new compiler warnings.

A "solution" was proposed to that problem - disable -Wno-suggest-override
and the other similar warning for clang. It's hard to call a solution
because those warnings are disabled not only for the old code, but also
for new. This is not what we want!

The main argument for not actually fixing the problem was that git
history will be screwed as well because of human factor. While good git
history is a very important thing, we should not go crazy about it and
block every change that somehow alters git history. git blame allows to
specify starting revision for a reason.

The other argument (human factor) can be easily solved by using tools
such as clang-tidy. clang-tidy is a clang-based linter for C++. It can
be used for various things, e.g. fixing coding style(e.g. add missing
braces to if statements, readability-braces-around-statements check),
or in our case add missing override keywords.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, apol, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22371
2019-07-22 20:03:22 +03:00
Kai Uwe Broulik ea97928426 Merge branch 'Plasma/5.16' 2019-07-09 11:15:20 +02:00
Igor Kovalenko 8dba9bfd43 Fix check for SCHED_RESET_ON_FORK feature in clean build
Configuration macro HAVE_SCHED_RESET_ON_FORK is not reflecting availability of SCHED_RESET_ON_FORK
in config-kwin.h because that feature is detected after file is already generated.

Fix this by moving config-kwin.h generation after feature detection.

Differential Revision: https://phabricator.kde.org/D22337
2019-07-09 11:14:37 +02:00
Jonathan Riddell 137b3fbf26 Update version number for 5.16.2
GIT_SILENT
2019-06-25 12:15:02 +01:00