Commit graph

20614 commits

Author SHA1 Message Date
Xaver Hugl
4b8b8b7652 egldmabuf: add some logging about supported formats
May help diagnose some bugs

CCBUG: 448284
2022-01-13 23:43:15 +00:00
Alexander Lohnau
ddf2c89206 Remove plugin loading using keywords
This was deprecated in during the 5.24 development period. All KDE
consumers are ported away from it. Third parties will get meaningful
runtime messages which instruct them to register the plugins without keywords.

The create overloads which take keywords were already deprecated in KPluginFactory.
2022-01-13 19:51:48 +00:00
Kai Uwe Broulik
b696bf7dec x11client: Consider _GTK_APPLICATION_ID for matching desktop files 2022-01-13 14:41:41 +00:00
Vlad Zahorodnii
b656a43c90 Remove service_utils.cpp
It's empty so remove it.
2022-01-13 14:44:56 +02:00
Vlad Zahorodnii
6494db75e9 scenes/opengl: Port lanczos filter to ShaderManager::generateShaderFromFile() 2022-01-13 12:04:37 +00:00
Vlad Zahorodnii
35e0abb089 kwineffects: Rename generateShaderFromResources() to generateShaderFromFile()
It works both with resource files and normal files.
2022-01-13 12:04:37 +00:00
Vlad Zahorodnii
754e0d8f6e effects: Fix resource file reading for builtin effects
Currently, the invert effect doesn't work because it can't load its
fragment shader because builtin effects are static libs. We need
Q_INIT_RESOURCE() before reading shader code.

This modularizes builtin effects more, which makes easier to add and
remove builtin effects, as well as allows to have per effect resources.

Technically, changing the inner workings of the ShaderManager is an
API incompatible change, but ShaderManager::generateShaderFromResources()
can be used only by builtin effects so it's okay.

ShaderManager::generateShaderFromResources() had to be changed because
two resource files can't share the same prefix. Appending "_core" was
inspired by QtQuick.
2022-01-13 12:04:37 +00:00
Jonathan Riddell
11763bb32c Update version number for 5.24.80
GIT_SILENT
2022-01-13 11:56:02 +00:00
Jonathan Riddell
307fcdf0e1 Update version number for 5.23.90
GIT_SILENT
2022-01-13 10:33:58 +00:00
l10n daemon script
dcb04308ee 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"
2022-01-13 01:44:19 +00:00
Xaver Hugl
2564886f7f backends/drm: fix legacy crash
CCBUG: 447680
2022-01-12 21:23:37 +00:00
Alexander Lohnau
88b908a27e KWin decorations KCM: Fix broken AdoptionCommand for KNewStuff
We need CMAKE_INSTALL_FULL_LIBEXECDIR, otherwise `lib/x86_64-linux-gnu/libexec/kwin-applywindowdecoration`
will be the resulting path, which does not contains the cmake install prefix.
Consequently KNS would fail to find it at runtime.

BUG: 447284
FIXED-IN: 5.24.0
2022-01-12 20:29:13 +01:00
Vlad Zahorodnii
e8e15a72f4 Drop UrgencyHint helper
It's unused.
2022-01-12 16:00:21 +02:00
Vlad Zahorodnii
58081c5bf8 wayland: Fix resizing of windows with aspect ratio
After finishing interactive resize, the window needs to be gravitated.
However, it won't be gravitated because isInteractiveMoveResize() will
return false.

In order to fix that, every configure event needs to carry the gravity,
that way the window can be gravitated even after leaving interactive
resize.
2022-01-12 13:12:41 +00:00
Vlad Zahorodnii
907c440e22 Introduce concept of interactive resize gravity
The gravity concept is a generic way to describe how a window must be
positioned during interactive resize. It works both when resizing the
window using a pointer or touch.
2022-01-12 13:12:41 +00:00
Vlad Zahorodnii
b15681fd9c wayland: Port to XdgToplevelInterface::ResizeAnchor 2022-01-12 13:12:41 +00:00
Vlad Zahorodnii
9a4a960886 x11: Handle late sync request
X11Client implicitly relied on the finishInteractiveMoveResize() function
to call moveResize() to synchronize the move resize geometry with the
server geometry. However, after removing that moveResize(), X11Client
got slightly broken.

A resize sync request may arrive shortly after finishing resize. In
order to properly handle it, this change makes X11Client handle late
sync requests.

It also makes handling interactive resize on x11 similar to how it's
done on wayland.

The main problem with not letting X11Client finish interactive resize
is that the Toplevel::bufferGeometry() may end up with an outdated value
and SurfacePixmapX11 will fail to create due to a mismatch between
Toplevel::bufferGeometry() and the server side geometry of the frame
window.
2022-01-12 12:00:41 +00:00
Vlad Zahorodnii
b4f2bc3898 Use correct glGetGraphicsResetStatus()
KWin loads glGetGraphicsResetStatus() on its own to handle ARB and EXT
extensions. After moving graphics reset handling to the RenderBackend,
kwin doesn't use its own glGetGraphicsResetStatus() function, but instead
uses the one provided by libepoxy, which panics if
glGetGraphicsResetStatus() is not in core spec. This change makes the
OpenGLBackend use kwin's glGetGraphicsResetStatus() function instead of
the one provided by libepoxy to avoid a crash.
2022-01-12 09:39:02 +00:00
l10n daemon script
d6002c2631 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"
2022-01-12 01:48:09 +00:00
Arjen Hiemstra
352e92e32f Support global defaults for input devices
This adds support for reading values from a "Libinput/Defaults" group in
the input config file. This allows specifying global defaults for
devices, that are preferred over the libinput defaults. Because of the
cascading mechanisms of KConfig, this then allows distributions and
hardware vendors to supply system-wide defaults for devices.
2022-01-11 12:24:01 +00:00
Arjen Hiemstra
0319a66ead Refactor libinput::Device::ConfigData
Rather than an awkward combination of template functions, function
pointers and multiple calls to almost-the-same-but-not-entirely
functions, make ConfigData itself a template and use type erasure to
store them in the config map. This makes the data object aware of its
type and allows us to specialise the reading of config values through
template specialisation. It also removes the need for multiple
constructors and setters in the ConfigData object.
2022-01-11 12:24:01 +00:00
Vlad Zahorodnii
8e8f55b18a Drop Process helper
Direct session is long time gone and SIGUSR1 and SIGUSR2 are not used
anywhere so drop the Process helper.
2022-01-11 08:01:10 +00:00
Vlad Zahorodnii
2979a850fa Drop ClearablePoint
It's unused.
2022-01-11 08:01:10 +00:00
Fabian Vogt
677f5fcb6e wayland: Move m_layoutList assignment out of Xkb::applyEnvironmentRules
Xkb::applyEnvironmentRules is meant to do just that, move the unrelated
code outside.
2022-01-10 19:54:58 +00:00
Weng Xuetian
cfa463c0ef Also forward key to input method for popup surface.
Popup may also want to use input method. If there is a keygrab, it also
need to forward input method instead of directly passing to wayland server.
2022-01-10 17:16:14 +00:00
Jan Grulich
9f44013fb5 Screencast: update PW buffer with only mouse cursor metadata on cursor change
As of now, we update cursor metadata only when the screen content changes, but
this results into not having smooth cursor movement. We can update only mouse
cursor location when it changes and send an empty buffer with mouse cursor
metadata so clients can have update mouse location.
2022-01-10 12:41:19 +00:00
Vlad Zahorodnii
861eac9205 Clean up Workspace::activeOutput()
Having both "active_client" and "client" is leftover after the active
output property being in the Screens class.
2022-01-10 11:23:55 +00:00
l10n daemon script
a2774e26a9 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"
2022-01-09 01:50:30 +00:00
Nicolas Fella
21212a71ec [kwin_rules_dialog] Add desktop file
This is needed for correct taskbar indentification
2022-01-08 20:16:34 +01:00
Ismael Asensio
72c0974a06 DesktopGridEffect: Fix crash when closing the effect
If the first condition would match (for instance after moving a window),
`windowMove` would be `nullptr`, triggering the crash later.

By the looks of it, it was maybe a typo.

BUG: 445335
FIXED-IN: 5.24

CC: @nicolasfella
2022-01-07 21:16:04 +00:00
Ismael Asensio
d13c39bec6 kcm/kwinrules: Fix header in properties list
This provides a better fix for the header positioning bug in
the properties list sheet, instead of the previous workaround
(which wasn't enough in some situations)

Upstream bugfix (in the Kirigami component) is not advisable as
it could cause unintended consequencies in other uses/apps

See also: https://bugs.kde.org/show_bug.cgi?id=422289

BUG: 421583
FIXED-IN: 5.24
2022-01-07 11:04:42 +00:00
Fabian Vogt
bd1fab3458 wayland: Honour default Xkb options
Currently KWin always uses the Options configured in kxkbrc because
QByteArray::constData() is never nullptr. This means that the system
default is ignored completely. Read ResetOldOptions to distinguish
between explicitly setting no options and using the system default.
2022-01-06 08:12:32 +00:00
Vlad Zahorodnii
81f9da17fd Drop resize effect
After recent refactor changes to improve resizing of xdg-toplevel
surfaces with an aspect ratio, the resize effect got really broken. The
resize effect has always been a problem child on wayland.

Unlike X11, geometry updates are performed asynchronously on Wayland.
It's not possible to have a smooth transition after finishing
interactive resize from the resized state to the normal state, geometry
will jump from last moveResizeGeometry() to the current frameGeometry()
and when the client repaints the window, the window size will jump back
to the move resize geometry size. There are no ways to fix that without
contradicting to how the effect is advertised to work, e.g. sending
configure events behind the back. Keeping the frame geometry out of sync
with the xdg_surface window geometry size is also not the option,
geometry updates are already too complex (due to being async).

Another wayland related issue with the resize effect is that the
compositor doesn't know about aspect ratio or any other size
constraints, except min and max size. The client can provide a smaller
buffer to account for various geometry constraints. It will be confusing
to have a mismatch between resize outline and the final real geometry.
Aspect ratio or other geometry constraints won't be exposed to the
compositor, it's a common decision of many wayland devs (including KDE).

To some extent, the wayland issues can be addressed by performing content
updates, with active feedback, the mismatch between outline and the
final geometry would become less severe, but it won't be any different
than resizing without the effect.

Given the wayland issues and in part maintenance costs, this change
drops the resize effect. Note that it can be still reimplemented without
kwin core changes, but it would still suffer from the aforementioned
issues.

BUG: 443434
2022-01-05 19:00:22 +02:00
Xaver Hugl
d18e631d47 backends/drm: hide cursor again
Before 6a99bfd2, the DrmBackend took care of checking this. Now it
needs to be explicitly checked in DrmOutput
2022-01-05 16:39:56 +01:00
Vlad Zahorodnii
dfe69a6784 effects: Enable the scale effect by default
It looks fancier than the fade effect.
2022-01-05 08:26:36 +00:00
Alexander Lohnau
1322b52b03 kwin scripts: No longer copy videowall metadata file in kservices folder
We load the KCM by path now and don't use KServiceTypeTrader
2022-01-05 08:13:09 +01:00
Alexander Lohnau
ab2ac07e2a Define X-KDE-ConfigModule for videowall KCM
This way we do not need to go through KServiceTypeTrader for the querying
2022-01-05 08:12:13 +01:00
Alexander Lohnau
a1340a9815 Rework determining of scripted effect config
Currently the plugin needs to set a property in oder to be considered configurable.

In kpackage we have the concept of optional and required files, based on the existence of those
optional files we can define different behavior. For example in Plasma the applets can optionally have a config ui.

Because here we don not use The KPackage:Package class, it is simpler to check the existence of the files on disk.
2022-01-05 08:12:13 +01:00
Alexander Lohnau
f2dd50e1f9 Clean up legacy configmodule querying
In KWin we are allowed to break compat and here all first party consumers
have already been ported for quite a while.

Also the querying is very inefficient, because for every plugin where the
X-KDE-ConfigModule property is not defined all available KCMs have to be opened and
their metadata parsed.

This way we also get rid of the deprecation warning for KPluginMetaData::readStringList.
2022-01-05 08:12:13 +01:00
Alexander Lohnau
32f9ba0caf Do not embed json metadata in KCMs that get loaded by path
Doe to 1a0031c08a3b41458eb5bf2097b4cd6452ba3d09 we no longer require json metadata to be embedded.
Also we did not use the metadata anywhere, except for finding the correct plugin.
2022-01-05 08:12:13 +01:00
Alexander Lohnau
728b449891 Effectsmodel: Load KCM by path instead of searching for plugin by id
This way we do not need to embed json metadata in the plugins
and can consequently drop the metadata files entirely.

The resulting metadata object might still be invalid, however KCoreAddons
can handle such cases. See https://phabricator.kde.org/T15094 regarding
create better KCoreAddons API for such cases.
2022-01-05 08:12:13 +01:00
Devin Lin
c59c52cb0c Expose org.kde.kwin.ColorCorrect.xml dbus file 2022-01-05 01:33:01 +00:00
Xaver Hugl
81905dbfaa backends/drm: properly handle pending transformations
AbstractWaylandOutput::pixelSize returns the size with already set transformation
applied but the render backends need the pending transformation
2022-01-04 22:22:57 +00:00
Xaver Hugl
b06ec13ead backends/drm: test crtc+connector combinations with hardware rotation
This should enable KWin to use hardware rotation in more situations. As
a fallback all hardware rotation is disabled and the test is done again
2022-01-04 22:22:57 +00:00
Xaver Hugl
dc5cddd33f backends/drm: ensure hardware transforms are properly applied and tested
Testing only the pipeline that this output uses is not enough and can
cause breakage on multi-monitor setups.
2022-01-04 22:22:57 +00:00
Xaver Hugl
2af3f46357 backends/drm: adjust logging verbosity 2022-01-04 22:22:57 +00:00
Ismael Asensio
088e870d54 TabBox: Add SwitcherItem to declarative API 3.0
Not sure if this was left out on purpose as a kind of deprecation.

It would be necessary to allow port the tabbox switchers to the newer 3.0 API and use their components (such as `Workspace`)

Probably for `Plasma/5.25` now.
2022-01-04 20:07:45 +00:00
Vlad Zahorodnii
457e9faaa1 Avoid sending a configure event when starting interactive move
There's nothing to configure that needs an acknowledgement from the
client.
2022-01-04 18:28:54 +02:00
Vlad Zahorodnii
feaebcf81d Rename XdgToplevelClient::m_requestedStates to m_nextStates
It's consistent with m_nextDecoration and m_requestedStates contains
both requested and "not requested" states (i.e. the ones set by kwin
without waiting for acknowledged from the client, e.g. activated).
2022-01-04 18:28:54 +02:00
Vlad Zahorodnii
5420e11bd4 Make AbstractClient::titlebarPosition() return Qt::Edge
Conceptually, it's an edge, the titlebar can't be in a window corner.
2022-01-04 15:57:42 +00:00