Commit graph

347 commits

Author SHA1 Message Date
Vlad Zahorodnii
42285bc659 backends/wayland: Remove AbstractEglBackend::setSurface() call
KWin requires surfacesless contexts, so this setSurface() is not needed.
This ensures that makeCurrent() won't make the opengl context current
against a surface that belongs to a removed output.
2022-07-19 18:56:12 +00:00
Vlad Zahorodnii
b81f16fbd5 x11: Remove unused field in EglOnXBackend 2022-07-19 17:19:40 +03:00
Vlad Zahorodnii
4dd9b0f15b x11: Drop support for multi-head
The main reason to drop multi-head support is that it has been simply
unmaintained for many many years. When implementing a feature, we don't
even bother checking if multi-head is broken, KCMs don't handle
multihead, window management features are written for Xinerama. KWin
is optimized for Xinerama-like operation mode in general, which is
provided out of the box.

If you use multihead for esoteric gpu stuff, consider using kwin_wayland!
2022-07-19 11:44:00 +00:00
Vlad Zahorodnii
faa006d76f backends/x11: Manage X11WindowedQPainterOutput using std::unique_ptr 2022-07-19 07:51:46 +00:00
Vlad Zahorodnii
c74fa4b571 backends/x11: Port windowed backend from Screens 2022-07-19 07:51:46 +00:00
Xaver Hugl
61b1eac5b8 platform, scenes: use std::unique_ptr for creation functions 2022-07-18 14:26:26 +00:00
Xaver Hugl
f50547de1e backends/drm: manage drm objects with std::unique_ptr
Also makes the connector detection code a bit more readable
2022-07-18 14:26:26 +00:00
Xaver Hugl
affa7386f8 backensd/drm: manage gpus with std::unique_ptr 2022-07-18 14:26:26 +00:00
Xaver Hugl
32c2ae15a4 backends/drm: manage drm properties with std::unique_ptr 2022-07-18 14:26:26 +00:00
Vlad Zahorodnii
64c71a37a0 backends/virtual: Use #pragma once 2022-07-18 08:36:04 +00:00
Vlad Zahorodnii
f80a14d4f6 backends/virtual: Make render backend naming consistent 2022-07-18 08:36:04 +00:00
Vlad Zahorodnii
5bf1332df5 backends/wayland: Use #pragma once 2022-07-18 08:36:04 +00:00
Vlad Zahorodnii
a56b09ab9d backends/wayland: Make render backend naming consistent 2022-07-18 08:36:04 +00:00
Vlad Zahorodnii
6db530bfde backends/x11: Use #pragma once 2022-07-18 08:36:04 +00:00
Vlad Zahorodnii
8dd719e4e2 backends/x11: Make render backend naming consistent 2022-07-18 08:36:04 +00:00
l10n daemon script
131b9d226a 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-07-17 01:46:18 +00:00
Xaver Hugl
636b411b31 backends/drm: don't crash if importing a texture fails
CCBUG: 456500
2022-07-15 13:42:48 +00:00
Aleix Pol
39f45ad70f WaylandOutput: Remove unused rendered attribute 2022-07-15 14:58:42 +02:00
Vlad Zahorodnii
d6646d25d0 Remove unused screens.h includes 2022-07-14 09:51:18 +03:00
Xaver Hugl
7f04ea578f backends/drm: handle broken legacy drivers better
Some legacy drivers either don't accept gbm buffers suitable for cursors,
or don't handle them properly. In order to work around that, always do a
CPU import with legacy and use dumb buffers instead.

BUG: 453860
CCBUG: 456306
2022-07-13 21:10:19 +02:00
Vlad Zahorodnii
5be18da8ac backends/virtual: Remove unused includes 2022-07-13 16:01:46 +00:00
Vlad Zahorodnii
728e369a4d backends/virtual: Remove eglSwapBuffers() call
It's noop, we use EGL_MESA_platform_surfaceless.
2022-07-13 16:01:46 +00:00
Xaver Hugl
9ac3c64d4c wayland/drmlease: split up DrmLeaseV1Interface::deny 2022-07-13 12:27:54 +00:00
Xaver Hugl
919b56e9a2 drmlease: send device done event correctly 2022-07-13 12:27:54 +00:00
Vlad Zahorodnii
71bfbe815c backends/virtual: Manage VirtualQPainterLayer using std::unique_ptr 2022-07-13 11:07:18 +00:00
Vlad Zahorodnii
26d4a06818 backends/virtual: Port from Screens 2022-07-13 11:07:18 +00:00
Vlad Zahorodnii
b3d3ca8c0f backends/drm: Remove unused screens.h includes 2022-07-13 10:21:44 +00:00
Vlad Zahorodnii
7d00766629 backends/drm: Make drm backend not touch output configuration if all outputs are disabled
This behavior was added in order to fix a crash reported in bug report
442990. However, the analysis was not 100% correct, kwin failed to
create a placeholder because the relevant check was incorrect. The drm
backend was checking the list of all connected outputs rather than the
list with enabled outputs to decide whether to create a placeholder output.

As a safety measure the proposed behavior makes sense, however the drm
backend is not the right layer to implement it. If the last enabled
output is disconnected, kscreen should view it as a new output
setup and re-enable outputs in order to ask user what desired output
configuration should be.
2022-07-12 09:54:50 +00:00
Xaver Hugl
0d302d5c66 backends/drm: also check for properties in DrmPipeline::needsModeset
Otherwise we may be missing situations where a modeset is needed

BUG: 455814
2022-07-11 14:31:55 +00:00
Xaver Hugl
2d43f3eee2 backends/drm: handle disconnected but not removed connector objects properly
The kernel doesn't disable connector objects that represent physical ports
when the output gets removed. If KWin tries to change the output configuration
without explicitly disabling the connector, atomic commits can fail.
2022-07-10 11:55:57 +00:00
Xaver Hugl
7d5d35928f backends/drm: don't create a new output every time 2022-07-06 09:52:49 +00:00
Xaver Hugl
a71146c999 backends/drm: don't remove connectors the kernel doesn't consider removed
Removing connectors that are still powered leads to a mismatch in atomic
commits: the crtc is still powered, but the connector also still there.
If KWin tries to disable the crtc afterwards, the atomic commits fail because
the connector needs to be disabled at the same time and it's missing from the
atomic commit request.

To fix this, whenever we fail to fetch information or get wrong data from
the kernel (like 0 modes), use the cached information instead and keep the
connector.

BUG: 456298
2022-07-05 19:11:33 +00:00
Aleix Pol
d5ddf55e9b gbm: Don't pass any flags when creating buffers with modifiers
It seems it doesn't bring much and it may backfire. Especially don't
pass GBM_BO_USE_LINEAR as it will limit a lot the buffers that can be
created and GBM_BO_USE_RENDERING use seems to be more harmful than
helpful on most cases.
2022-07-04 22:52:40 +00:00
l10n daemon script
c0307bb402 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-07-02 02:03:09 +00:00
Xaver Hugl
0c453739b1 backends/drm: fix common mode generation
The unit for refresh rate was wrong, which caused insanely high as well
as negative refresh rates

BUG: 455477
2022-06-29 20:53:55 +02:00
Xaver Hugl
da7dad1586 surfaceitem, surfacetexture: manage pixmaps and textures with std::unique_ptr 2022-06-29 13:18:51 +00:00
Xaver Hugl
1ff623e95e renderbackends: make SurfaceTexture creation methods use std::unique_ptr 2022-06-29 13:18:51 +00:00
Xaver Hugl
ef97158f96 backends/drm: suppress logging for direct scanout
BUG: 456089
2022-06-29 09:59:10 +02:00
Xaver Hugl
29625218d3 backends/drm: fix flicker with rotation on mobile
When we use a shadow buffer, we always render to the whole surface - setting
the damage region is incorrect and invokes undefined behavior. On the Lima
driver this caused flickering on screen rotation.
To fix this, don't set a damage region when we use a shadow buffer, which is
effectively setting the damage region to the full surface
2022-06-28 08:38:43 +00:00
Xaver Hugl
47c08d6f66 backends/drm: ensure modeset properties are reset properly
Without this, all atomic modeset commits fail on setups with a VR headset
2022-06-27 19:14:08 +00:00
Xaver Hugl
42c5e6bcf6 backends/drm: handle failing commits better
It can happen that the drm backend temporarily lacks permission to do atomic
commits, or that the cached drm property values become out of sync with
the real values held by the kernel. Instead of failing with both, attempt
to update property values and try the commits again at a later time.
2022-06-25 17:25:17 +02:00
Marco Martin
66a54d38d4 effects: Set timestamp for input events
Set the time for mouse and touch events. This is especially important
for the mouse is as the timestamp will be used to discriminate between
single and double click. Previously this was always sending the double
click event, making buttons work only every other click.

BUG: 454275
BUG: 449907
2022-06-24 17:54:55 +00:00
Vlad Zahorodnii
b62dd29210 backends/drm: Change the base class of DrmLeaseOutput
At the moment, the DrmLeaseOutput class inherits from the
KWaylandServer::DrmLeaseConnectionV1Interface class. While this works,
it's not a future-proof design. For example, kwin could also lease its
"desktop" outputs in order to let another wayland compositor run
alongside it.

Also, it's a good practice to prefer composition over inheritance.
2022-06-23 19:51:24 +00:00
Laurent Montel
c83568dfdd GIT_SILENT: remove extra ';' 2022-06-23 13:43:09 +02:00
Laurent Montel
d1837b8603 Remove extra ';' 2022-06-23 06:56:25 +02:00
Xaver Hugl
6d9d4c190a backends/drm: fix enabled+inactive check
When dpms disabled outputs get set active, they require a modeset. If after
that they are set inactive again without resetting the pipelines first,
they no longer require a modeset but still have the pending properties that
would enable a crtc - but without a framebuffer set.

To prevent this, first test the current setup as it is, and only then see
if the pipelines would work if enabled again.
2022-06-22 10:22:30 +02:00
Aleix Pol
9dbd0c4b36 backends/wayland: Offer the connector name as the model
It's more useful than ""
2022-06-22 01:54:19 +02:00
Xaver Hugl
3ea14d6e36 backends: use std::unique_ptr for RenderLoop 2022-06-21 17:50:49 +00:00
Xaver Hugl
a38a44cb2a libinput: use std::unique_ptr for events 2022-06-21 17:50:49 +00:00
Xaver Hugl
d2f7f75d39 manage Session with std::unique_ptr 2022-06-21 17:50:49 +00:00