Commit graph

485 commits

Author SHA1 Message Date
Volker Krause
f6f2c28aa6 Add additional includes needed by Qt6 2022-03-14 16:41:10 +00:00
Volker Krause
9d9e89fb84 Don't rely on implicit QScopedPointer to bool conversion
No longer available in Qt6.
2022-03-14 13:58:55 +00:00
Xaver Hugl
1fd1c03742 screencast: make context current in tryEnqueue
The method is used when the cursor position changes. There is no guarantee
that a context would be current at that point in time
2022-03-14 01:58:31 +00:00
Volker Krause
a34717dc22 Ensure moc sees fully qualified property types
Qt6 insists on that. We can do this either by including the moc files,
or by including the corresponding headers in the header defining the
properties, the former seems cleaner when possible.
2022-03-13 16:56:26 +00:00
l10n daemon script
03c80db56d 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-03-13 01:57:28 +00:00
Volker Krause
c5a712a77a Don't rely on implicit conversion from int to QUuid
Not available in Qt6 anymore.
2022-03-12 10:48:44 +00:00
Volker Krause
0143b63527 Use version-less Qt macros, targets and variables
Prepares for building against Qt6.
2022-03-11 14:37:24 +00:00
Michail Vourlakos
bcff044c73 [aurorae] - support blurregion from kdecoration2
This is an approach for aurorae engine to publish masks for its decorated windows in order to avoid out of window blurring at the decoration corners. Aurorae themes are now able to specify a **mask** element inside **decoration.svg** file like plasma themes already do. Mask is used afterwards to calculate theme's blur region.


| Before | After |
| ------ | ----- |
|![before](/uploads/26014e79c3d5d45ba12fa5cf62294b1c/before.png)|![after](/uploads/923d7021eaaf322be96b611c73558666/after.png)|

Adjusted Aurorae theme for testing: [ROUNDED-DARK.tar.gz](/uploads/082f60ad4311e3e296b7faeeb7c97dac/ROUNDED-DARK.tar.gz)

BUG:395725
2022-03-06 09:58:11 +00:00
Aleix Pol
b11499d95e Remove AbstractWaylandOutput::isBeingRecorded
It's not being used anywhere
2022-03-04 04:05:24 +01:00
l10n daemon script
9d33190d0d 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-02-17 01:53:20 +00:00
l10n daemon script
648b2a5bf3 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-02-16 01:49:32 +00:00
Vlad Zahorodnii
f4f83848b0 kwinglutils: Make GLRenderTarget not store GLTexture reference
This allows us to make the GLRenderTarget a bit nicer when using it to
wrap the default fbo as we don't know what the color attachment texture
is besides its size.

This means that the responsibility of ensuring that the color attachment
outlives the fbo is now up to the caller. However, most of kwin code
has been written that way, so it's not an issue.
2022-02-15 13:30:39 +02:00
Vlad Zahorodnii
e9af67af3e kwineffects: Add GLTexture::render() overload that takes no scissor region
In many cases, we don't care about the scissor region. This change adds
a relevant overload to make code easier to read.
2022-02-15 12:17:59 +02:00
Vlad Zahorodnii
52beb213e7 kwineffects: Make GLRenderTarget and GLVertexBuffer work without global coords and scale
Because the GLRenderTarget and the GLVertexBuffer use the global
coordinate system, they are not ergonomic in render layers.

Assigning the device pixel ratio to GLRenderTarget and GLVertexBuffer is
an interesting api design choice too. Scaling is a window system
abstraction, which is absent in OpenGL or Vulkan. For example, it's not
possible to create an OpenGL texture with a scale factor of 2. It only
works with device pixels.

This change makes the GLRenderTarget and the GLVertexBuffer more
ergonomic for usages other than rendering the workspace by removing all
the global coordinate system and scaling stuff. That's the
responsibility of the users of those two classes.
2022-02-15 12:17:56 +02:00
Vlad Zahorodnii
3da9e017a0 cmake: Use target-based ecm_qt_declare_logging_category()
This makes CMakeLists.txt code depend less on variables.
2022-02-14 07:29:15 +00:00
l10n daemon script
ead073b0cc 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-02-14 01:42:49 +00:00
Nicolas Fella
a2ebad760f Implement services in our QPA
This is required for QDesktopServices to work.

Use QGenericUnixServices like the xcb and wayland QPA

BUG: 446144
2022-02-13 00:41:10 +01:00
Vlad Zahorodnii
712dbc4122 wayland: Fix mispositioned decoration tooltips
QPlatformScreen::virtualSiblings() must return a list of screens on the
virtual desktop, otherwise QToolTip will use
QGuiApplication::primaryScreen() instead of looking up the screen where
the decoration tooltip must be shown using QDesktopWidget::screenNumber().

BUG: 432860
2022-02-11 10:08:19 +00:00
David Edmundson
12427932de Make openGL context current when recording frame triggered by cursor move
recordFrame requires an openGL context. This is typically done after a
frame is rendered, but when we send a frame after a cursor move this is
not guaranteed.

BUG: 448162
2022-02-11 09:24:12 +00:00
l10n daemon script
97dde989c3 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-02-11 01:45:31 +00:00
Aleix Pol
725d61877c screencast: have our streams provide SPA_META_Header
It can be useful for clients to know what's going on in a specific
stream.
2022-02-10 23:57:09 +00:00
Ben Cooksley
a428630ea4 Purge all references to download.kde.org, replacing them with the correct endpoint of autoconfig.kde.org.
CCMAIL: plasma-devel@kde.org
CCMAIL: distributions@kde.org
2022-02-07 06:12:40 +13:00
l10n daemon script
f1974db5c9 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-31 01:43:23 +00:00
Vlad Zahorodnii
e2a393ce2d Move utils.h file to utils directory 2022-01-25 16:56:33 +00:00
Vlad Zahorodnii
0e1d65d5a2 Move opengl context attribute builders to utils directory 2022-01-25 16:56:33 +00:00
Vlad Zahorodnii
52bc46069e plugins/screencast: Always clear bitmap cursor
Otherwise the contents of the bitmap can be undefined if the cursor
image is null.
2022-01-24 19:39:09 +00:00
Vlad Zahorodnii
d2867fc4a0 plugins/screencast: Hard-code the maximum cursor size to (256, 256)
XCURSOR_SIZE * scale factor is not the way to compute the current cursor
size. For example, with breeze cursor theme at an output with a scale of
2 and cursor size 24, cursor images will have the effective size of (64, 64).

Also, the cursor can change when passing over user interface elements.

In order to accommodate for all of that, this change makes kwin reserve
enough of space for a cursor of size 256x256. "256" is a magical number
that comes from DRM. With many drivers, the maximum cursor size is 256.

BUG: 448840
2022-01-24 19:39:09 +00:00
Vlad Zahorodnii
edb1a41148 plugins/screencast: Provide hidpi cursor bitmaps 2022-01-24 19:39:09 +00:00
l10n daemon script
32bdf28868 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-24 01:42:58 +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
l10n daemon script
5e5752b8c4 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"
2021-12-31 01:42:54 +00:00
l10n daemon script
0db88c3ea6 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"
2021-12-15 01:55:28 +00:00
Vlad Zahorodnii
f308447cc2 plugins/screencast: Enable alpha channel for window streams
It appears like a dozen of applications that provide window
screencasting feature don't support BGR video format, only BGRA and BGRx.
2021-12-09 16:20:23 +00:00
Columbariu s
621c06deda screencast: Fix format announced with SHM enum format
Kwin announces a format with alpha when Dma-Bufs are available, even
when the texture doesn't contain any. This results in clients segfault
when trying to access the buffer assuming a maxsize wrt. the announced
format by ways of dimensions and bpp.

This patch moves the format masking to affect the Dma-Buf transport
only.
2021-12-06 04:02:01 +01:00
l10n daemon script
3bb3c604c8 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"
2021-11-29 01:38:36 +00:00
l10n daemon script
20e5fc62b1 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"
2021-11-28 01:32:42 +00:00
Vlad Zahorodnii
4881dd63a7 kwineffects: Make OffscreenQuickView generate double click events
Currently, MouseArea.doubleClicked doesn't work in QtQuick effects.
Luckily, the overview effect doesn't use it, but it's still worth making
sure that it works as expected regardless of whether it's a kwin effect.

With this change, the OffscreenQuickView will keep track of the last
mouse press event. If the second button press occurs within the mouse
double click interval, the OffscreenQuickView will generate a
QEvent::MouseButtonDblClick event, similar to what QGuiApplication would
normally do when processing window system events.
2021-11-24 14:02:44 +00:00
Vlad Zahorodnii
ec5950aedb Rename EffectQuickScene to OffscreenQuickScene
EffectQuickScene is not used strictly by effects, aurorae decorations
use it too to render window decorations.

This change renames the EffectQuickView/Scene to
OffscreenQuickView/Scene to clear up the naming scheme.
2021-11-23 09:53:18 +00:00
l10n daemon script
f07c66f040 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"
2021-11-20 01:25:15 +00:00
Aleix Pol
a5899c2cbb screencast: Do not report a cursor geometry before we have a cursor texture
Otherwise we just crash as we don't know the size yet.
2021-11-18 03:02:19 +00:00
Vlad Zahorodnii
af4c37c095 plugins/screencast: Rename PipeWireStream to ScreenCastStream
This change renames the PipeWireStream class to ScreenCastStream to make
naming consistent.
2021-11-16 09:04:10 +00:00
Vlad Zahorodnii
eecf14394e plugins/screencast: Introduce ScreenCastSource.closed signal
With the closed signal, we can unify how screen cast streams are closed.
2021-11-16 07:24:03 +00:00
Vlad Zahorodnii
e7cd2c4396 plugins/screencast: Optimize output screencasting with memfd
When screencasting an output, read the output texture directly.
2021-11-16 07:24:03 +00:00
Vlad Zahorodnii
92a461c687 plugins/screencast: Exclude client-side drop shadows
The buffer geometry may include client-side drop shadows, which looks
odd when screencasting.
2021-11-16 07:24:03 +00:00
Vlad Zahorodnii
10032e99e3 plugins/screencast: Make embedded cursor position handling simpler
If the position of the cursor changes, let the screen cast source to
repaint memfd or dmabuf buffer.
2021-11-16 07:24:03 +00:00
Vlad Zahorodnii
c3c87ed8fa plugins/screencast: Introduce base ScreenCastSource type
Currently, when screencasting a window, kwin may render a window into a
temporary offscreen texture, copy that offscreen texture to the dma-buf
render target, and discard the offscreen texture.

Allocating and deallocating offscreen textures is inefficient. Another
issue is that the screencast plugin uses Scene::Window::windowTexture().
It's a blocker for killing scene windows.

This change introduces a base ScreenCastSource type. It allows us to
move away from Scene::Window::windowTexture() and make the dma-buf code
path efficient with applications such as Firefox that utilize
sub-surfaces.

With the ScreenCastSource, kwin can also provide screen cast frames with
arbitrary device pixel ratio.
2021-11-16 07:24:03 +00:00
Vlad Zahorodnii
6d0cca5c7f Move all dirty region scene repaint scheduling to Scene
The Compositor contains nothing that can potentially get dirty and need
repainting.

As is, the advantages of this move aren't really noticeable, but it
makes sense with multiple scenes.

Backend parts are far from ideal, they can be improved later on as we
progress with the scene redesign.
2021-11-11 11:33:04 +02:00
Vlad Zahorodnii
aead97c39f Move scenes to the src directory
Similar to the backends, it's far more intuitive to have scenes in the
toplevel source directory rather than the plugins directory.
2021-11-08 10:22:07 +00:00
Vlad Zahorodnii
2fd93e329a scenes/opengl: Stop pushing map shader in SceneOpenGL constructor
KWin can work just fine even without an initially pushed MapTexture
shader. This simplifies the initialization of the SceneOpenGL.
2021-11-08 08:32:45 +00:00
Vlad Zahorodnii
350144cde6 scenes/opengl: Remove viewport check
It's unreliable and it sometimes produces false positives (due to buggy
drivers).
2021-11-08 08:32:45 +00:00