Commit graph

24955 commits

Author SHA1 Message Date
Xaver Hugl
3cc238f85f plugins/backgroundcontrast: fix transformations
While the GLFramebuffer::blitFromRenderTarget helper un-applies the transformations
the rendertarget has, the effect is not written with that in mind. In order to keep
it working properly, blit without any transformations and only adjust the coordinate
system difference between texture and fbo
2023-07-04 15:00:10 +00:00
Daniel Lipovetsky
b31baaf0cd tabbox: Show window switcher only when there are two or more windows
Previously, we showed the window switcher even if there was only one
window, or no windows.

Now, we show the window switcher only if there are two or more windows.
Note that "desktop" counts as a window when the switcher's "show desktop
mode" is enabled.

BUG: 370396
BUG: 419408
2023-07-04 13:38:30 +00:00
Daniel Lipovetsky
a02f09250d tabbox: Add desktop window to client list only if "show desktop mode" enabled
Previously, we always added the desktop to the client list when the list
was empty. We added it even if the switcher's "show desktop mode" was
disabled.

Now, we only add the desktop to the client list if the switcher's "show
desktop mode" is enabled.
2023-07-04 13:38:30 +00:00
Laurent Montel
86c6238cfa Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
Aleix Pol Gonzalez
49a76ea772 Install KWaylandServer headers
There are use cases for the headers to be used, e.g. when implementing
wayland-specific workflows from an Effect.
In order to be able to use these, we also need to expose libkwin to be
imported as it carries the interfaces' symbols.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2023-07-04 08:22:43 +00:00
Aleix Pol Gonzalez
6fd1867681 Drop options.h include
Don't include options.h from renderloop.h. This way it can be included
from outside the project without dragging all of the KWin dependencies.
2023-07-04 08:22:43 +00:00
l10n daemon script
aec482cbe8 GIT_SILENT Sync po/docbooks with svn 2023-07-04 03:47:08 +00:00
l10n daemon script
a529de21dc GIT_SILENT Sync po/docbooks with svn 2023-07-03 02:49:02 +00:00
l10n daemon script
c4d99d0193 GIT_SILENT Sync po/docbooks with svn 2023-07-02 02:56:03 +00:00
l10n daemon script
7e717beb91 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-07-02 02:52:22 +00:00
Vlad Zahorodnii
88ade3a409 Extract reusable egl swapchain bits
EGL rendering has some duplicated bits, so this change extracts
them to reduce code duplication.
2023-07-01 12:22:28 +00:00
Vlad Zahorodnii
3bd5e91226 Extract reusable qpainter swapchain bits
QPainter rendering has some duplicated bits, so this change extracts
them to reduce code duplication.
2023-07-01 12:22:28 +00:00
Vlad Zahorodnii
80a3fea9f8 core: Allow mapping shared memory graphics buffer
Shared memory graphics buffers can be mapped, so implement
GraphicsBuffer::map() and GraphicsBuffer::unmap().
2023-07-01 12:22:28 +00:00
David Edmundson
d8029e461e x11: Sync frame extents in X11 native pixels
Frame extents are written out over the wire they should be in X11 native
pixels.

i.e if we are using 200% scaling, and have X11 clients scale themselves
then from the point of view of the client reading the properties the
window decorations are twice the size as normal.

BUG: 471132
2023-07-01 12:48:26 +01:00
David Edmundson
ad2f78f627 screencast: Drop unused headers 2023-07-01 12:47:55 +01:00
David Edmundson
b1e6deee3f screencast: Convert event handlers into methods
ScreencastStream is a C++ class, but we're having C style event handling
as static functions within the class. Mixing two styles within a class
isn't very clear.

We can turn them into normal methods with some thin wrapper functions
round the event handling.
2023-07-01 12:47:55 +01:00
David Edmundson
5ef0b775ef screencast: Use consistent prefix for member variables 2023-07-01 12:47:55 +01:00
David Edmundson
ced95f536c Adapt offscreenquickview to Qt6 changes
Qt6 documentation states:

"Note: When using this window in combination with QQuickRenderControl,
the result of this function is an empty image, unless the software
backend is in use. "

We support a mode of using openGL rendering but then exporting as pixmap
images for Aurorae. In this case we should simply grab data from our
FBO.

BUG: 471041
2023-07-01 12:47:32 +01:00
David Edmundson
e93adbee07 xwayland: Guard against xwyayland connection closing in input spy
The event spy is removed when xwayland closed, but it's based on the
process not the wayland socket, so it can be temporarily out of sync.

There were no guards for the connection being null.

BUG: 471789
2023-07-01 12:47:17 +01:00
Mike Noe
f09f5c608d Fix reference errors, port to Kirigami
Fix reference errors in qml/Outline and plugins/OutputLabel
2023-07-01 07:19:26 +00:00
l10n daemon script
8ea47b4c62 GIT_SILENT Sync po/docbooks with svn 2023-07-01 02:25:18 +00:00
Vlad Zahorodnii
e1980c0009 cmake: Search for KF6Service
KF6Plasma no longer pulls it.
2023-06-30 11:45:47 +01:00
l10n daemon script
8f124f5ebb GIT_SILENT Sync po/docbooks with svn 2023-06-30 02:28:34 +00:00
l10n daemon script
b692a53e9c GIT_SILENT Sync po/docbooks with svn 2023-06-29 02:25:40 +00:00
l10n daemon script
4ad342aedf 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-06-29 02:22:26 +00:00
l10n daemon script
6ed2b33d62 GIT_SILENT Sync po/docbooks with svn 2023-06-28 02:29:30 +00:00
Xaver Hugl
e55c9e924e platformsupport/egldisplay: fix external_only filtering for implicit modifiers 2023-06-27 21:26:14 +02:00
ivan tkachenko
b270ff92ae
kcms/scripts: Relax Kirigami import version
Needed to make DisplayHint type available, which is registered as 2.14.

Amends 899bef4126
2023-06-27 20:24:04 +03:00
ivan tkachenko
899bef4126
kcms/scripts: Set text of Delete action correctly
Fixes missing text on the menu item in ActionToolBar's menu.
2023-06-27 18:43:29 +03:00
Laurent Montel
c7ccf91d92 We use Qt6/kf6 only 2023-06-27 04:45:01 +00:00
l10n daemon script
b23d707e0c GIT_SILENT Sync po/docbooks with svn 2023-06-26 02:30:08 +00:00
l10n daemon script
edcd52dd9f GIT_SILENT Sync po/docbooks with svn 2023-06-25 02:53:10 +00:00
David Edmundson
b22e58846a contrast: Improve performance
glCopyTexSubImage2D is super slow on Intel GPUs on wayland.

We have an existing method to read from the framebuffer that is used in
the blur and other effects.

Rather than creating a scratch framebuffer every frame we keep a cache
per window for the lifespan of the effect.

BUG: 469151
2023-06-24 07:54:34 +00:00
l10n daemon script
2d53204738 GIT_SILENT Sync po/docbooks with svn 2023-06-24 02:52:03 +00:00
l10n daemon script
c817568735 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-06-24 02:48:07 +00:00
Aleksei Bavshin
f70bda9f6d
locale1: fix use-after-free in xkb_keymap creation
qPrintable creates temporary objects that are destroyed before
`xkb_keymap_new_from_names` is called. It's highly likely that the data
we pass to xkbcommon will be overwritten by random data by that point.

Fix that by storing values as QByteArrays just like
`Xkb::loadKeymapFromConfig` does.
2023-06-23 03:14:09 -07:00
Xaver Hugl
cd94cdaf3a plugins/backgroundcontrast,blur: ensure the effect is only applied behind the window
When a window is translated and/or scaled, the effect must be strictly behind the
window and never beyond it, as that is very noticeable.

BUG: 469625
2023-06-23 08:45:21 +00:00
Vlad Zahorodnii
acf1333bee plugins/overview: Precompile qml code
This saves us qml parsing extra step.
2023-06-23 08:01:03 +00:00
Vlad Zahorodnii
16cc0f5ebb autotests: Make test framework a static lib again
Static plugins being linked with shared libraries doesn't work smoothly.
POSITION_INDEPENDENT_CODE target property needs to be set for
every such plugin. However, there can be targets that we have no control
over, which need POSITION_INDEPENDENT_CODE to be set too. Asking such
projects to add this property and them refusing to do so would be
reasonable because kwin's entire static plugin pipeline is weird.

The test framework was made a shared library because kwin build
directory used to get really big (in 10s of gigabytes).

Due to the -fPIC issues, this change makes the test framework a static
lib again. Obviously, this brings back the big build directory problem.
But, it's not as terrible as it used to be. With this change, kwin build
directory is a couple of gigabytes in debug build, which is a lot but
not as bad as it used to be before.
2023-06-23 08:01:03 +00:00
David Edmundson
6d83ce30af wayland: Update window caption suffix on map
Window captions have a suffix for disambiguation, based on window
captions of other mapped windows.

In xdgshell we update this when a caption changes, but this could be
before a window is mapped. This can lead to two windows at once having
the same suffix, as a suffix could be used but not in the list of
searched clients.

BUG: 450369
2023-06-23 07:32:18 +00:00
l10n daemon script
666c8d69c9 GIT_SILENT Sync po/docbooks with svn 2023-06-23 02:37:27 +00:00
l10n daemon script
5dbe7d7adc 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-06-23 02:33:21 +00:00
l10n daemon script
acd281f04d GIT_SILENT Sync po/docbooks with svn 2023-06-22 02:30:21 +00:00
Laurent Montel
d604f4ed16 Remove PlasmaCore qml module (unused) 2023-06-21 22:18:40 +02:00
Marco Martin
569e0f8f64 Port to KSvg
port Svg and FrameSvg items to KSvg
2023-06-21 15:16:39 +00:00
Xaver Hugl
2132dddf0d layershellv1window: don't destroy the window twice
Outputs get disabled before they get destroyed, so destroying the window
when the output gets disabled and when it gets destroyed causes the window
to be destroyed twice and run into an assert
2023-06-21 16:44:58 +02:00
Xaver Hugl
4d9a0d2306 input: don't crash if the internal handle is nullptr
Pointer focus can stay on a closed tooltip while focus updates are blocked,
so this needs to be checked for

BUG: 471285
2023-06-21 11:48:29 +00:00
Vlad Zahorodnii
3698127bc6 Drop InputConfig
The InputConfig was introduced to handle tests that don't have valid
kwinApp object. Those tests have been either reworked or dropped, so
let's drop the InputConfig to tidy the config stuff.
2023-06-21 10:48:50 +00:00
Vlad Zahorodnii
84c7d3cf4b autotests: Remove cursor.cpp from test framework sources
It's included because of InputConfig, but we don't need to include
cursor.cpp for this purpose.
2023-06-21 10:48:50 +00:00
Nate Graham
dd4f879ecd outputconfigurationstore: reformat comment
GIT_SILENT
2023-06-21 11:17:00 +02:00