Commit graph

275 commits

Author SHA1 Message Date
Alexander Lohnau
7d1db53f6b Remove unneeded includes from headers and cpp files 2024-01-13 11:34:45 +01:00
Vlad Zahorodnii
784d48ef52 Port away from deprecated KConfigBase::group() api 2023-11-28 10:02:03 +00:00
Vlad Zahorodnii
d9f5d432be Port to KF6 2023-02-28 18:30:26 +02:00
Vlad Zahorodnii
e293972eaa Run clang-tidy with -checks=readability-braces-around-statements fixit
This fixes style issues in old code.
2022-03-28 10:54:11 +00:00
Vlad Zahorodnii
7096e3ead8 Run clang-format
The .clang-format file is based on the one in ECM except the following
style options:

 - AlwaysBreakBeforeMultilineStrings
 - BinPackArguments
 - BinPackParameters
 - ColumnLimit
 - BreakBeforeBraces
 - KeepEmptyLinesAtTheStartOfBlocks
2022-03-25 13:25:15 +02:00
Vlad Zahorodnii
811beb94e0 Remove Xrender backend
The Xrender backend was added at the time when OpenGL drivers were not
particularly stable. Nowadays though, it's a totally different situation.

The OpenGL render backend has been the default one for many years. It's
quite stable, and it allows implementing many advanced features that
other render backends don't.

Many features are not tested with it during the development cycle; the
only time when it is noticed is when changes in other parts of kwin break
the build in the xrender backend. Effectively, the xrender backend is
unmaintained nowadays.

Given that the xrender backend is effectively unmaintained and our focus
being shifted towards wayland, this change drops the xrender backend in
favor of the opengl backend.

Besides being de-facto unmaintained, another issue is that QtQuick does
not support and most likely will never support the Xrender API. This
poses a problem as we want thumbnail items to be natively integrated in
the qtquick scene graph.
2021-06-09 11:21:57 +03:00
Laurent Montel
3c63750f6e GIT_SILENT: don't use deprecated cmake variable 2021-02-08 20:19:33 +01:00
Nicolas Fella
99947c8bd8 Use versionless Qt cmake target
This makes it easier to build against both Qt5 and Qt6

GIT_SILENT
2021-01-30 17:18:21 +01:00
Vlad Zahorodnii
44176c6a8c Lower default severity of logging categories
Warning messages are not the kind of messages that should be ignored,
they indicate that something is off or wrong.

Also, this makes triaging bugs easier as we no longer have to ask people
to run kwin with the QT_LOGGING_RULES environment variable set.
2021-01-25 14:03:14 +02:00
Vlad Zahorodnii
7e5c16989e Drop hwcomposer backend
Plasma Mobile announced that they plan to drop support for Halium
devices, see the announcement blog post [1] for the reasons that led to
such a decision.

But just to summarize, here are some of the key points from the post:

 * Some of our team members no longer have access to reference LG Nexus
   5X device anymore
 * After KDE Neon switched to using Ubuntu 20.04 we no longer are
   updating the rootfs for halium devices
 * After several important architecture changes in upstream KWin, the
   hwcomposer backend might be broken and we have no way of verifying it

If the community members are interested in reviving the hwcomposer
backend,

  * it pretty much needs rewrite/re-thinking given differences of hwc1
    and hwc2 API for hwcomposer part of it, see also [2]
  * It also needs removal of Android 5 based libhardware API as we don't
    think code can be kept sane with 3 different levels of ifdefs
  * This backend needs better way of fixing difference between
    CAF/non-CAF devices then just recompiling with different headers,
    maybe env vars?
  * This backend does not support various things like transformation/
    rotation etc, and is not exactly feature complete as the DRM backend

[1] https://www.plasma-mobile.org/2020/12/14/plasma-mobile-technical-debt.html
[2] 83f563c339
2021-01-05 17:38:36 +00:00
Vlad Zahorodnii
2a8395c7dd Trim trailing whitespace 2020-11-28 11:01:47 +00:00
Vlad Zahorodnii
80554a3e12 Expose KWIN_XWL logging category to kdebugsettings 2020-09-24 14:56:35 +03:00
Vlad Zahorodnii
4ce853e8e4 Prettify license headers 2020-08-07 19:57:56 +00:00
Vlad Zahorodnii
1fb9f6f13a Switch to SPDX license markers
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.

In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
2020-08-07 19:57:56 +00:00
Vlad Zahorodnii
2103b999e7 screencast: Address minor issues 2020-07-28 18:38:49 +00:00
Méven Car
e3df2e15a6 ScreenshotEffect: Use Service Property to authorize screenshot without confirmation
Summary:
Restrict to process with `X-KDE-DBUS-Restricted-Interfaces=org.kde.kwin.Screenshot` in their corresponding Service file,
 to take screenshots.
Such a program can now take immediate screenshots.

Adds a utility file to group KService related logic.

Needed for D29408

Reviewers: #kwin, apol, davidedmundson, bport, zzag

Reviewed By: #kwin, davidedmundson

Subscribers: ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29407
2020-06-16 19:00:04 +02: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
Laurent Montel
9587a6777b We depend against 5.62 2019-09-11 07:55:47 +02:00
Laurent Montel
6df7b2e863 Use new logging category directory when ECM>=5.59 2019-06-13 13:31:51 +02:00
Vlad Zagorodniy
b06c1ea5a4 Move icons to data dir
Summary: We don't need them in the toplevel directory.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18771
2019-02-06 01:19:54 +02:00
David Edmundson
f3060723e1 [kcmkwin/kwinrules] Don't include kdeglobals in rules config
Summary:
There's nothing relevant in kdeglobals and loading it can lead to noise
when deleting groups that override a system default.

We still cascade which will allow kiosk keys to work as well as relevant
system defaults.

Import/Export is unchanged as that already uses SimpleConfig which
includes this flag.

I don't know if it will fix the relevant issue in the bug or just
reduce noise.

CCBUG: 402139

Test Plan: Compiled.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17645
2018-12-19 13:07:50 +00:00
Bhushan Shah
533f43ad02 Make it easier to debug the virtualkeyboard
Summary:
Provide the important debug messages which can be used to debug why
virtualkeyboard is not starting.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17454
2018-12-10 16:28:13 +05:30
Laurent Montel
24f57310ba Use new syntax 2018-11-22 07:46:40 +01:00
David Edmundson
a3cff85e7a Remove Qt module declarations in includes
Summary:
Test Plan: Compiles

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13359
2018-06-05 18:07:23 +01:00
Martin Flöser
8ae37c420b Move SceneOpenGL into a dedicated plugin
Summary:
Unfortunately a rather large change which required more refactoring than
initially expected. The main problem was that some parts needed to go
into platformsupport so that the platform plugins can link them. Due to
the rather monolithic nature of scene_opengl.h a few changes were
required:
* SceneOpenGL::Texture -> SceneOpenGLTexture
* SceneOpenGL::TexturePrivate -> SceneOpenGLTexturePrivate
* texture based code into dedicated files
* SwapProfiler code into dedicated files
* SwapProfiler only used in x11 variants
* Safety checks for OpenGL scene moved into the new plugin
* signal declared in SceneOpenGL moved to Scene, so that we don't need
to include SceneOpenGL in composite

Test Plan: Nested OpenGL compositor works

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7740
2017-09-30 13:12:10 +02:00
Martin Flöser
535b107969 Move QPainter compositor into plugin
This change is similar to D7232 and moves the scene_qpainter into a
dedicated plugin. Compared to the XRender case it's more complicated as
the platform plugins need to implement a platform specific backend.

The base implementation for this part used to be in scene_qpainter. As
the idea is to completly move it away from KWin core it would be point
less to still have the backend definition in KWin core, but it cannot
be in the scene plugin as otherwise all platforms need to link the
plugin.

To solve this a new platformsupport subdirectory is added which contains
the scene platform backend as a static library. For the OpenGL scene such
a static library will also be required.

Test Plan: SceneQPainter test still passes, nested compositor still works

Reviewers: #kwin, #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7259
2017-09-01 17:44:49 +02:00
Martin Flöser
054d923411 Move SceneXRender into a plugin
Summary:
First step for loading the compositor Scenes through plugins. The general
idea is that we currently needlessly pull in all the Scenes although only
one will be used.

E.g. on X11 we pull in QPainter, although they are not compatible. On
Wayland we pull in XRender although they are not compatible.

Furthermore our current Scene creation strategy is not really fault
tolerant and can create situations where we don't get a compositor. E.g
on fbdev backend the default settings won't work as it does not support
OpenGL.

Long term I want to tackle those conceptional problems together:
we try to load all plugins supported by the current platform till we have
a scene which works. Thus on Wayland we don't end up in a situation where
we don't have a working compositor because the configuration is bad.

To make this possible the switch statement in the Scene needs to go and
needs to be replaced by a for loop iterating over all the available
scenes on the platform. If we go there it makes sense to replace it
directly with a plugin based approach.

So this is a change which tackles the problem by first introducing the
plugin loading. The xrender based scene (as it's the most simple one)
is moved into a plugin. It is first tried to find a scene plugin and only
if there is none the existing code is used.

Test Plan: Tested all scenes

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7232
2017-09-01 17:42:28 +02:00
Martin Flöser
ddf3536f19 Drop Client::cap_deco as it's nowhere used
Summary:
cap_deco was only used in the caption with stripped arg case which was
unused and thus removed. Now cap_deco is completely unused.

Due to that we can also remove the stripped client script which only
manipulated the cap_deco.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7077
2017-08-07 21:18:40 +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
e5648dcf4c [plugins/platforms] Dedicated logging category for X11 standalone platform 2016-04-12 14:48:54 +02:00
Martin Gräßlin
2205c98ec2 Introduce dedicated debug category for everything xkbcommon related 2016-02-19 13:59:02 +01:00
Martin Gräßlin
bffbbce172 [scripting] Add dedicated logging category 2015-07-31 13:25:51 +02:00
Martin Gräßlin
09880d1267 [decorations] Introduce logging category for decorations 2015-07-31 13:13:46 +02:00
Martin Gräßlin
910c49959a [tabbox] Add dedicated logging category for TabBox 2015-07-31 13:13:41 +02:00
Martin Gräßlin
fe28ca1d8a [libinput] Add dedicated logging category for libinput 2015-07-31 12:43:35 +02:00
Martin Gräßlin
57c521c214 [libkwineffects] Introduce logging categories for libkwineffects 2015-07-31 12:16:15 +02:00
Martin Gräßlin
f7d317601e Install a categories file for kdebugsettings
Instead of setting our own filter rules we install a categories file
to allow to configure them. This seems to still have them enabled by
default, but should at least give distributions the possibility to
disable logging by default.
2015-07-15 12:02:31 +02:00
Martin Gräßlin
c9c81267d2 [data] Rename kwin_update_default_rules to kwin5_update_default_rules
Rename is for better coinstallability. It makes sense to support both
versions as kwin4 and kwin5 use different config file paths.
2014-05-07 11:50:22 +02:00
Martin Gräßlin
3f2da48925 [data] Drop pop.wav
Not referenced from anywhere in the code base.

Run git grep -i pop.wav without any result.
2014-05-07 11:50:22 +02:00
Martin Gräßlin
4a79cec8a6 Drop hacks and default rule for XV
Apparently it's not about mplayer but about XV [1], not really a relevant
application nowadays which would be important enough for having hacks.

REVIEW: 117479

[1] https://en.wikipedia.org/wiki/Xv
2014-04-10 15:04:19 +02:00
l10n daemon script
e6db000065 SVN_SILENT made messages (.desktop file) 2014-04-04 05:29:27 +00:00
l10n daemon script
eef56c98b2 SVN_SILENT made messages (.desktop file) 2014-04-03 05:10:09 +00:00
Bhushan Shah
bdb6854a57 kde4support--
REVIEW: 115150
2014-01-21 03:12:41 +05:30
l10n daemon script
22a5e1109f SVN_SILENT made messages (.desktop file) 2014-01-19 04:06:03 +00:00
Martin Gräßlin
b7f3f582e3 [kwin] Re-enable build of kwin_update_default_rules
Currently using KDE4Support, needs more proper porting. Tool works,
installs the kwin rule.
2014-01-16 21:35:18 +01:00
Martin Gräßlin
8c0fe2ad41 [kwin] Clean up data directory
We do not provide a config update path from anything older than
4.11 to 5.0. This means we can remove all the kconfig update tools
leading to 4.11.
2014-01-16 21:35:18 +01:00
Laurent Navet
88fc43beeb kwin : replace Q_FOREACH with for(a:b)
replace Q_FOREACH loops with newer for (a:b) notation

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>

REVIEW: 114222
2013-12-13 08:54:34 +01:00
Aleix Pol
7b110f0671 Improve CMake usage
It's basically a run of the port-cmake.sh script in here, mostly the changes
are the following:
- Using KF5::* targets
- Using the proper macros, following recent developments in frameworks
2013-11-15 13:37:47 +01:00
l10n daemon script
0796a306c9 SVN_SILENT made messages (.desktop file) 2013-10-30 04:07:25 +00:00
Martin Gräßlin
57905c0cc2 And we got rid of KDebug
Usages of kBacktrace got dropped.
2013-09-02 13:14:39 +02:00