Commit graph

24308 commits

Author SHA1 Message Date
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
Vlad Zahorodnii
318d126664 backends/wayland: Don't leak WaylandEventThread's pipe fds 2023-03-08 17:21:10 +02:00
Weng Xuetian
06ed58cb31 Fix text-input-v1 compatibility with 111.0.5563.64-1
While the documentation is not clear, it seems that preedit_cursor is
always required for every preedit_string event. Send preedit_cursor for
the preedit_string event we generate upon commit_string.
2023-03-08 12:30:00 +00:00
Vlad Zahorodnii
bc79d76ef6 effects/wobblywindows: Don't mess with clip region
Scene used to use the clip region as is even if the window is
transformed. That's no longer the case, so stop mutating the clip region
in favor of a more declarative approach to handling window painting.
2023-03-08 09:20:04 +00:00
l10n daemon script
73c58d6fb9 GIT_SILENT Sync po/docbooks with svn 2023-03-08 02:47:33 +00:00
Xaver Hugl
f2417a8523 backends/drm: support CTM for simple color transformations
In order to work around hardware and drivers that aren't capable of applying
a LUT, calculate a per-channel factor for brightness and color temperature
modification. While this ignores color calibration, this makes night color
work until a proper shader based color pipeline is implemented.

BUG: 455720
2023-03-07 17:03:40 +01:00
Vlad Zahorodnii
f4a35ed619 libkwineffects: Remove window tabbing leftovers 2023-03-07 14:46:45 +00:00
Vlad Zahorodnii
c0ff9526f9 Remove leftover from old times in PopupInputFilter
The windowShown connection is leftover from the times when kwin used to
not destroy the window object if the associated wl_surface has been
unmapped.
2023-03-07 14:15:18 +00:00
Vlad Zahorodnii
9ed1f28d0f scripting: Drop registerShortcut() function in QML API
Use ShortcutHandler type instead.
2023-03-07 13:57:38 +00:00
Vlad Zahorodnii
c121253d10 scripting: Introduce ShortcutHandler
The ShortcutHandler type provides scripts QML idiomatic way to register
global shortcuts.

There's one caveat about this API though. Since KGlobalAccel does not
allow to change the shortcut by repeating KGlobalAccel::setShortcut(),
the ShortcutHandler requires the default shortcut to be set before it's
constructed.
2023-03-07 13:57:38 +00:00
Vlad Zahorodnii
c191902026 wayland: Setup compositing when window is mapped ready for painting
This prevents creating a WindowItem until we know that the window is
actually going to be visible on the screen.
2023-03-07 13:44:03 +00:00
Vlad Zahorodnii
5cd99b27fd Apply 1 suggestion(s) to 1 file(s) 2023-03-07 13:23:52 +00:00
Xaver Hugl
ca78157a2d Apply 2 suggestion(s) to 1 file(s) 2023-03-07 13:23:52 +00:00
Vlad Zahorodnii
42e05def40 effects/screenshot: Port to QPromise
QFutureInterface is technically internal Qt API and the screenshot uses
it solely because we knew that there won't be any future Qt 5 releases
and it won't be removed in 5.15 patch releases.

In Qt 6, we have proper public API. Unlike QFutureInterface, QPromise is
not copyable, therefore this change also ports some parts of the screenshot
effect from QVector, which uses copy-on-write, to std::vector.
2023-03-07 13:23:52 +00:00
Vlad Zahorodnii
51a8e486b4 Remove X11 specific properties
Scripts should not rely on X11 or Wayland specific properties, but
rather use common abstractions. So remove X11 window specific properties.
2023-03-07 13:06:06 +00:00