19514 Commits (811beb94e0a7dd5666906b07a51a84efe5f1bb53)
 

Author SHA1 Message Date
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.
3 years ago
Vlad Zahorodnii 3c2ca184e3 effects: Remove Desktop Cube Animation effect
With the ongoing scene redesign, it needs to be rewritten. However,
given that it is not used widely based on support information from
various bug reports and our available man power is sparse, the most
reasonable thing is to drop the effect, unfortunately.
3 years ago
Vlad Zahorodnii 47ef0b5a3c effects: Remove Desktop Cube effect
With the ongoing scene redesign, it needs to be rewritten. However,
given that it is not used widely based on support information from
various bug reports and our available man power is sparse, the most
reasonable thing is to drop the effect, unfortunately.
3 years ago
Vlad Zahorodnii 3722c21660 effects: Remove Cover Switch effect
With the ongoing scene redesign, it needs to be rewritten. However,
given that it is not used widely based on support information from
various bug reports and our available man power is sparse, the most
reasonable thing is to drop the effect, unfortunately.
3 years ago
Vlad Zahorodnii bcff948e39 effects: Remove Flip Switch effect
With the ongoing scene redesign, it needs to be rewritten. However,
given that it is not used widely based on support information from
various bug reports and our available man power is sparse, the most
reasonable thing is to drop the effect, unfortunately.
3 years ago
Xaver Hugl 4ee3f69dd5 platforms/drm: only allocate two dumb buffers for the swapchain 3 years ago
Vlad Zahorodnii 35e37f7347 Fix loading of window rules
We need to call KCoreConfigSkeleton::load() otherwise window rule
objects will not be created.
3 years ago
Vlad Zahorodnii 5929147ee1 Remove unused include 3 years ago
Xaver Hugl 19f92d731a platforms/drm: fix modifiers detection
CCBUG: 437893
3 years ago
Andrey Butirsky 471d635f0c [tabbox] fix non-working global shortcuts overrides
static cuts[] array was initialized only once with copies of non-const
objects, so when new shortcuts are configured, the old objects were still
referenced.
Fixed by having non-static array instead, so actual objects are copied
on the init every time.

BUG: 359141
3 years ago
Vlad Zahorodnii 52eabd064d Remove unused define preprocessor directive
IN_KWIN is unused.
3 years ago
Vlad Zahorodnii 9d1db97f05 Make kwin friendlier for static code analysis tools
Some static code analysis tools break when analysing kwinbindings.cpp.

This change moves the contents of kwinbindings.cpp file in useractions.cpp
to make those tools happier. It also makes code more readable.
3 years ago
Vlad Zahorodnii 7a063f9ab7 Build kwin with QT_NO_KEYWORDS 3 years ago
Vlad Zahorodnii 1b2c7b248b Run clazy with qt-keywords fixit
In C++20, there will be emit() class member, which can conflict with the
emit keyword. Given that, there are plans to enable QT_NO_KEYWORDS by
default in the future.

See also
https://lists.qt-project.org/pipermail/development/2020-February/038812.html
3 years ago
Ismael Asensio b5a58f83ee kcm/kwinrules: Manage RuleSettings instead of Rules objects
The KCM now manages the RuleSettings config objects directly,
instead of using a list of `Rules` objects as an intermediary.

This highly reduces the overhead, improving loading and saving
times, and also enables a better use of KConfig capabilites.

The config state is now automatically tracked by KConfigXT
objects. Whenever the user edits either the rule list, or any
specific property within a rule, the `needsSave` state is
updated accordingly.

BUG: 421564
FIXED-IN: 5.23
3 years ago
Ismael Asensio 61c2055da7 rulebooksettings: Add accesors to the rules settings list
Previously, the only way to access the rules list was via
the `rules()` and `setRules()` methods, so the actual
settings objects were not accesible.

This commit adds methods to retrieve, insert, remove or reorder
the rules within the list.

Since every individual rule is stored as a KConfig group, and
they are not designed to be dynamically renamed, using consecutive
numbered groups and store only the total count is problematic.

So we also add a new stringlist setting to store the rules group
names and their order.

Now any group name is valid. To avoid collisions use random QUuids
as group names for newly created rules.
3 years ago
Vlad Zahorodnii d4f75f3e64 scripting: Add clientArea() overload that takes mutable client
Even though there is a clientArea() overload that takes const abstract
clients, QJSEngine seems to be unable to find the right clientArea()
overload if a mutable abstract client has been passed.

BUG: 437507
3 years ago
Alexander Lohnau 9c689d7ddb plugins: Port away from deprecated version checks
Task: https://phabricator.kde.org/T14302
3 years ago
Xaver Hugl 3c10398104 screencast: only use glGetTextureImage where supported 3 years ago
Xaver Hugl 0208f78336 platforms/drm: make context current for direct scanout 3 years ago
Xaver Hugl cfd7af0179 platforms/drm: support NVidia as secondary GPU with CPU copy
BUG: 431062
3 years ago
Vlad Zahorodnii 605f00d03a effects/backgroundcontrast: Properly handle empty regions set by internal windows 3 years ago
Vlad Zahorodnii cade5064c3 effects/blur: Properly handle empty blur regions set by internal windows
The task switcher has a valid empty blur region and the blur effect
misdetects that, which results in no blurred background.

BUG: 433131
3 years ago
Aleix Pol 34bfc25759 inputmethod: Don't move the clients around when the input panel is an overlay
It's meant to be floating around the cursor, if we do this we just get a
weird tiny screen.
3 years ago
Ömer Fadıl Usta 8fc3b024be Update dumb_swapchain.cpp 3 years ago
Vlad Zahorodnii 8c8098a61c Move X11Client::wantsShadowToBeRendered to AbstractClient
Otherwise only X11 windows will lose server-side drop-shadows when the
maximized mode changes.

BUG: 434213
3 years ago
Vlad Zahorodnii 5498b37938 scenes/opengl: Delegate viewport setup to backend
Only the backend knows what the right viewport rect is. Furthermore,
setting up the viewport before rendering is less error-prone.
3 years ago
Vlad Zahorodnii d3f4da370b Prevent emitting Scene::frameRendered more than once per frame
Currently, the frameRendered() signal is emitted every time an effect
calls paintScreen(). This means that the frameRendered() signal can be
emitted more than once when effects such as slide are active. However,
we'd like if it's emitted only once before buffers are swapped.
3 years ago
Vlad Zahorodnii 8b3e999fbf scenes/opengl: Properly destroy backend if initialization fails
SceneOpenGL takes the ownership of the backend. So, if the scene fails
to initialize, the backend will be deleted twice.
3 years ago
Bhushan Shah 2b1d709b04 inputmethod: hook the key and modifiers functions 3 years ago
Aleix Pol 454425b43f inputmethod: Allow input methods to grab the keyboard
This allows different input methods to get information about what's
beign typed from the actual hardware. This is especially useful for
non-latin script languages.
3 years ago
Xaver Hugl c5ea99cbe5 AbstractEglBackend: only clean up OpenGL context if primary 3 years ago
Aleix Pol 74724065ae inputmethod: Don't disable them by default if there's a connected keyboard
If the user has chosen to have a virtual keyboard (i.e. prefered maliit
over none in the KCM) they should get it. If it's too annoying it should
either be disabled or we can fix it so it gets less in the way.

This is especially important since some hardware registers itself as a
keyboard even if it's not a fully functional keyboard.
3 years ago
David Edmundson 4a16e18808 Remove Wayland::Client usage in wl->xwl drags 3 years ago
Ömer Fadıl Usta 6c97cd118d fix include 3 years ago
Xaver Hugl b88b6f3bc3 platforms/drm: log when direct scanout starts and stops 3 years ago
Vlad Zahorodnii de3b7a96db effects/blur: Ignore xshape region
EffectWindow::shape() doesn't fit the item based design. This change
ports the blur effect away from the shape() function to the rect()
function. The XShape extension was introduced when windows with an alpha
channel wasn't really a thing. Setting a shape served as a way to clip a
window, the most notable example is xeyes.

If an application relies on the xshape extension to actually clip the
window and not to force the window manager not to put the server-side
deco, it most likely doesn't support translucency and therefore it
shouldn't set the blur region to begin with.

This change makes the blur effect ignore the xshape region similar to
the background contrast effect. It allows us to decouple a bit more
effects from the rest of rendering machinery and thus make it easier for
us to move forward with the scene redesign goal.
3 years ago
l10n daemon script c1aa1c6c09 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"
3 years ago
Aleix Pol aba3335ea6 Fix weird decoration glitch when using a scaled display
We used to get a weird line around the window decoration because the
clamping would hit the outside of the rendered decoration.
To make sure we fall inside take the displayPixelRatio into account.
Also on non-integer scales, make sure we are actually falling inside.
3 years ago
Xaver Hugl 7bf79090cf platforms/drm: add outputs on EglGbmBackend initialisation
BUG: 437761
3 years ago
Vlad Zahorodnii 33bb146861 scenes/opengl: Remove unused render node leaf type 3 years ago
Vlad Zahorodnii 048c732a4e scenes/opengl: Remove half-pixel correction workaround
It was needed to work around visual glitches in the wobbly windows
effect. Since the wobbly windows effect renders the animated window into
an offscreen texture, we don't need this workaround anymore.

Furthermore, rather than using half-pixel correction, it is more
desirable to use an offscreen texture as it results in simpler design.
Performance-wise, it's not that bad that we need to start looking for
other ways to get rid of the seams between window contents and deco.
3 years ago
Vlad Zahorodnii 8d378cd4cd effects/fallapart: Port to DeformEffect 3 years ago
Vlad Zahorodnii 61d3134aa5 effects/magiclamp: Port to DeformEffect 3 years ago
Vlad Zahorodnii ab706e53dc effects/wobblywindows: Port to DeformEffect 3 years ago
Vlad Zahorodnii 5255ebf8d0 kwineffects: Introduce DeformEffect
DeformEffect is the base class for effects that transform the window
quad grid, e.g. wobbly windows or magic lamp. The main difference
between normal effects and offscreen effects is that the latter renders
animated windows into offscreen textures which are later deformed.

The offscreen texture approach is superior to the half-pixel correction
approach as it produces more visually appealing results. Even with
half-pixel correction, you're still going to see jagged lines between
the main surface and the server-side decoration or drop-shadow.

It is also needed to reduce the number of usages of WindowPaintData::quads
which is needed to move forward with the scene redesign goal.
3 years ago
Vlad Zahorodnii d4ade78aac kwineffects: Add parent argument to Effect 3 years ago
Vlad Zahorodnii b0042a30c1 x11: Pick better names for geometries before blocking
The new names express better what "geometries before update blocking" are.
3 years ago
Vlad Zahorodnii c3978f197b x11: Properly detect the case where client window moves inside frame window
If the window borders change in such a way that the buffer geometry
doesn't change, but the client geometry does change, we need to configure
the wrapper window and maybe the client window so there are no black
borders, etc.
3 years ago
Vlad Zahorodnii ce0edde906 x11: Remove irrelevant comments
The relevant code the comment talks about was removed long time ago.
3 years ago