Commit graph

24522 commits

Author SHA1 Message Date
l10n daemon script
01cfa5e484 GIT_SILENT Sync po/docbooks with svn 2023-03-14 02:39:54 +00:00
Vlad Zahorodnii
b4413f4b8b scene: Rework window elevation
The order in which windows are painted is computed dynamically every
frame. On the other hand, with the introduction of items, it's desired
to avoid doing that so repaints can be scheduled as needed. The
unification also opens the possibilities for more rendering related
refactors to make the code nicer and more reusable.
2023-03-13 17:27:15 +00:00
Aleix Pol
1cbc9185fb screencast: Properly detect the fallback
Do not check an it that is the container's end()
2023-03-13 16:49:06 +00:00
Vlad Zahorodnii
bacc35c236 backends/virtual: Provide vertically mirrored layer buffers
This makes the behavior of the virtual backend more consistent with
wayland, x11, and drm backends. However, the main advantage is that it's
more nicer to memfd fallback code path in screencasting plugin.
2023-03-13 15:34:36 +00:00
Vlad Zahorodnii
2f56cdc3fe Replace Deleted with Window where possible
With this, Window and Deleted can be interchanged, which makes merging
the two easier.
2023-03-13 14:41:44 +02:00
Vlad Zahorodnii
149db99c6a Make Window ref'able 2023-03-13 14:41:44 +02:00
Vlad Zahorodnii
995d509e45 Allow destroying Deleted immediately
Currently Deleted are destroyed with a delay to avoid dangling pointers
within the middle of painting.

On the other hand, it's reasonable to require not to delete windows when
kwin starts painting the screen.

Over the years, we refactored how deleted windows. They are always
unreferenced after finishing the current frame. So it should be fine to
destroy Deleted immediately now.
2023-03-13 14:41:41 +02:00
Vlad Zahorodnii
cdd18cd393 effects/slidingpopups: Prevent potential use-after-free 2023-03-13 12:15:23 +00:00
Vlad Zahorodnii
58ac7888e9 backends/x11: Split EglOnXBackend
The differences between windowed and host flavors of the X11 backend
have become too big, so let's split EglOnXBackend to avoid abstracting
something that makes little sense.
2023-03-13 11:36:06 +00:00
Vlad Zahorodnii
3bec3abb3f Use "window" instead of "toplevel" in Workspace 2023-03-13 10:37:01 +00:00
Vlad Zahorodnii
5b18cba3a0 Drop Workspace::{findAbstractClient,forEachAbstractClient} 2023-03-13 10:37:01 +00:00
Vlad Zahorodnii
497ba4a62a Stop including deleted windows in Workspace::forEachToplevel 2023-03-13 10:37:01 +00:00
Xaver Hugl
7f619e7770 colordevice: default the simple transformations to 1 2023-03-13 07:30:51 +00:00
Xaver Hugl
96b625f7d7 backends/drm: fail commits if nonexistent properties would be set 2023-03-13 07:30:51 +00:00
l10n daemon script
fa814d0b68 GIT_SILENT Sync po/docbooks with svn 2023-03-13 02:53:41 +00:00
l10n daemon script
a92a4a9f20 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"
2023-03-13 02:48:29 +00:00
Xaver Hugl
4df1b3a219 backends/drm: ignore opaque formats for the cursor plane
The kernel may expose an opaque format that we normally prefer, so to
prevent picking an opaque format for the cursor, filter those out.
2023-03-12 18:18:50 +00:00
Vlad Zahorodnii
166b5f96fc effects/screenshot: Use more FileDescriptor
It helps to express the ownership of the pipe fd in ScreenShotSinkPipe2
better.

ScreenShotSinkPipe2 is not made to take a FileDescriptor too because
it's complicated by CaptureInteractive().
2023-03-12 14:52:18 +00:00
Vlad Zahorodnii
4148be0d27 Port to versionless QML module imports
It's more convenient and Qt upstream seems to encourage to use it too,
e.g. example import statements have no version.
2023-03-12 14:18:34 +00:00
Vlad Zahorodnii
18a9b3b25a Adjust to KDecoration API changes 2023-03-12 13:29:36 +00:00
l10n daemon script
c2b4526791 GIT_SILENT Sync po/docbooks with svn 2023-03-12 04:33:16 +00:00
l10n daemon script
62fafd4b5d GIT_SILENT Sync po/docbooks with svn 2023-03-11 03:08:09 +00:00
l10n daemon script
e4da7fed68 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"
2023-03-11 02:58:17 +00:00
Vlad Zahorodnii
86e1305e80 rules: Make wmclass matching case sensitive
WM_CLASS is case sensitive.
2023-03-10 14:16:32 +00:00
Vlad Zahorodnii
11eac9d431 x11: Use WM_CLASS with original casing
WM_CLASS is case sensitive.
2023-03-10 14:16:32 +00:00
Vlad Zahorodnii
2d10212d82 backends/x11: Remove stray metadata file 2023-03-10 10:45:00 +02:00
Vlad Zahorodnii
0fd4d821ca libkwineffects: Forward declare RenderTarget and RenderViewport in kwineffects.h
kwineffects.h is included in many files and not everyone needs the
RenderTarget and RenderViewport, so forward declare them to reduce the
amount of parsing work for the compiler.
2023-03-10 07:19:33 +00:00
l10n daemon script
e35d759b0d GIT_SILENT Sync po/docbooks with svn 2023-03-10 02:50:47 +00:00
Weng Xuetian
a03b6fa08f Forward keymap and modifier change to input method keyboard grab when changed. 2023-03-09 20:39:26 +00:00
Vlad Zahorodnii
bd91f77212 backends/x11: Use more UniqueCPtr 2023-03-09 15:56:46 +00:00
Vlad Zahorodnii
19fec2a657 backends/x11: Use DRI3 directly
At the moment, the buffers for wsi are allocated implicitly by the EGL
implementation, which is fine for "normal" use cases. But we start
hitting the ceiling the moment we need to something more advanced. For
example the EGL backend creates a dummy fbo object wrapping the default
framebuffer, meaning that we cannot pass it to qtquick (because it can
use its own opengl context).

Another reason for using explicit buffers is that it lets us to clean up
some output related abstractions.
2023-03-09 15:56:46 +00:00
Aleix Pol
d34cf36bfa inputmethod: Show the input method even if it was dismissed
Reset the current context in case we receive a show() event from the
client, meaning that they really want to see that virtual keyboard.

BUG: 466969
2023-03-09 14:18:57 +00:00
Vlad Zahorodnii
472b88d02a backends/wayland: Port away from ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT
There are proper abstractions to ask the scene level to render with y
axis inverted so let's use it instead.
2023-03-09 13:22:53 +00:00
Xaver Hugl
ba85512f21 effects: remove rendertarget scale from WindowPaintData
If an effect needs to override the rendertarget scale, it should use RenderViewport
to do that
2023-03-09 13:22:53 +00:00
Xaver Hugl
125c141b7d effects: remove ScreenPaintData
The only purpose ScreenPaintData had was to pass around a copy of the viewport
projection matrix and the effectscreen, which can be handled in a simpler
way separately.
2023-03-09 13:22:53 +00:00
Xaver Hugl
e4938297e6 scene: fix texture inversion with the drm backend
Specify the render target to buffer transformation and take that into
account in effects and when calculating the projection matrix.
2023-03-09 13:22:53 +00:00
Xaver Hugl
2417a0381f backends/drm: port from gbm_surface to a custom swapchain using gbm buffers 2023-03-09 13:22:53 +00:00
Xaver Hugl
9eb8c3fcfb effects/blur: use a texture per screen on Wayland
This simplifies the effect and reduces its VRAM usage with multi monitor
setups
2023-03-09 13:22:53 +00:00
Xaver Hugl
5eb7ad37e5 effects/blur: manage render targets with std::unique_ptr 2023-03-09 13:22:53 +00:00
Xaver Hugl
d737ed6687 effects: introduce RenderTarget and RenderViewport
Instead of calling effects->renderTargetRect() and effects->renderTargetScale(),
pass the actually used render target and viewport in all the necessary methods.
This ensures that if an effect renders a screen with a modified scale or
projection matrix, the modified values get used instead of the "global" ones
2023-03-09 13:22:53 +00:00
Vlad Zahorodnii
c1eca80190 wayland: Remove implicit slide constraint adjustment
Panel sets constraint adjustments so let's remove the implicit slide
constraint adjustment to adhere more closely to the spec.
2023-03-09 13:05:42 +00:00
Vlad Zahorodnii
e38807b282 effects: Use scripting QML engine
Qt would need to allocate fewer "tainted" data objects, and using the
same engine both in effects and in kwin is vital for features such as
QML based effects.
2023-03-09 08:10:42 +00:00
l10n daemon script
2dcea8c19b GIT_SILENT Sync po/docbooks with svn 2023-03-09 02:37:20 +00:00
Natalie Clarius
4f617e90b8 placement: add autotests for cascade if covering 2023-03-08 19:04:57 +00:00
Natalie Clarius
39cea49a8f placement: don't cascade for the sake of windows that are already covered
When checking for overlap with other windows when placing a new window and cascading to avoid complete overlap, ignore those windows that are already covered by other windows further on the top anyway.

The computation of the covered area is not entirely accurate as it uses the bounding rect rather than the combined rects of the windows, but okay enough for our use case imo.

BUG: 466135
2023-03-08 19:04:57 +00:00
Nate Graham
a2bf59005e virtualdesktops: use Meta key for axis shortcuts
These shortcuts currently don't use the Meta key, which allows them to
block app shortcuts (for example, in the Reaper DAW app). In general
it's a good idea for global shortcuts to use the Meta key to avoid
these kinds of conflicts since apps typically don't use the Meta key
for their own shortcuts. Other axis shortcuts set by KWin components
already do this, so let's do the same thing here.

BUG: 466915
FIXED-IN: 6.0
2023-03-08 17:43:21 +00:00
Vlad Zahorodnii
02fd869106 xwayland: Prevent potential file descriptor leak 2023-03-08 17:21:45 +00:00
Vlad Zahorodnii
1e0d5bba71 wayland: Prevent leaking --wayland-fd and --xwayland-fd to child processes
fcntl() expects FD_CLOEXEC instead of conventional O_CLOEXEC.
2023-03-08 16:55:49 +00:00
Vlad Zahorodnii
0e3bf29e3b helper: Don't leak lock file to kwin_wayland
The wrapper owns the socket, so kwin_wayland doesn't need to care about
the lock file.
2023-03-08 17:55:00 +02:00
Vlad Zahorodnii
1260e63305 backends/wayland: Don't leak renderD128 fd 2023-03-08 17:21:17 +02:00