Commit graph

24400 commits

Author SHA1 Message Date
l10n daemon script
074a4fd286 GIT_SILENT Sync po/docbooks with svn 2023-02-28 02:38:23 +00:00
l10n daemon script
1bfe7c2659 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-02-28 02:08:05 +00:00
Vlad Zahorodnii
2dc7364a23 effects: Drop WindowHeap.windowClicked signal
Put a TapHandler in WindowHeapDelegate instead.
2023-02-27 16:55:56 +00:00
Vlad Zahorodnii
43cac75034 wayland: Fix xdg-toplevel and xdg-popup window initialization
Buggy clients can commit the wl_surface several times in a row. On the
other hand, XdgToplevelInterface and XdgPopupInterface consider a
surface to be initialized if it has been configured. If the second
wl_surface commit comes before the configure event is sent, kwin will
initialize a toplevel or popup twice, which can trigger asserts.

BUG: 466530
2023-02-27 15:43:56 +00:00
Aleix Pol Gonzalez
4cda16ce3a screencasting: Close streams when the output is disabled
It's technically possible to keep it somewhat going right now and just
not send frames but it doesn't make much intuitive sense.
2023-02-27 15:42:07 +00:00
Vlad Zahorodnii
fff462aed6 scene: Track stack position in WindowItem
If the WindowItem tracks the stack position, it will automagically
schedule repaints when a window is raised or lowered.
2023-02-27 14:57:48 +00:00
Vlad Zahorodnii
8fc634684c wayland: Setup compositing for internal window when it's mapped
Aurorae decoration plugin creates an unmapped internal window, it's not
rendered and so it's not added to the Workspace.

Internal window setups compositing in its constructor too. It means that
the WindowItem will have a link to the scene, but since the Compositor
has no any idea about the internal window yet, that scene can become a
dangling pointer, and kwin can crash when the window item is destroyed.

BUG: 466313
2023-02-27 12:07:39 +00:00
Vlad Zahorodnii
298d63bc71 Remove no longer relevant case in Workspace::replaceInStack()
Unmanaged windows are always in the stack now, so the else branch is not
needed, and in fact, it can produce undesired side effects if unmapped
window is closed.
2023-02-27 12:07:39 +00:00
l10n daemon script
6745cb87ec GIT_SILENT Sync po/docbooks with svn 2023-02-27 02:46:37 +00:00
Vlad Zahorodnii
53b0dc3a5d Unify Window::killWindow() for unmanaged windows 2023-02-26 14:12:53 +02:00
l10n daemon script
944bff100e GIT_SILENT Sync po/docbooks with svn 2023-02-26 02:28:54 +00:00
Vlad Zahorodnii
351cf8b585 Drop Window::setDesktop()
It's unused.
2023-02-25 22:57:29 +00:00
Vlad Zahorodnii
cd4d04c683 Move X11 specific code in Window::setDesktops() to X11Window 2023-02-25 22:12:30 +00:00
Vlad Zahorodnii
3809a2712b tabbox: Remove unused arg in DesktopChainManager::addDesktop() 2023-02-25 21:22:40 +00:00
Vlad Zahorodnii
d79a4a1daa Make VirtualDesktopManager::currentChanged pass VirtualDesktop
It fixes the remaining usage of int desktop ids in Workspace, ignoring
Workspace::setInitialDesktop().
2023-02-25 21:22:40 +00:00
Vlad Zahorodnii
9ea839eb03 libkwineffects: Add missing QQuickRenderControl::{beginFrame,endFrame} calls
As QQuickRenderControl docs state, beginFrame() and endFrame() must
enclose sync() and render() calls.
2023-02-25 19:25:03 +00:00
Vlad Zahorodnii
aff8ed4c12 Remove window argument in interactive move resize signals
Remove the window argument to clean up the api. If the window is needed,
capture it using a lambda or use sender().
2023-02-25 19:36:41 +02:00
Vlad Zahorodnii
ad330924e2 Rename Window::desktopChanged()
We have Window::desktops(), so rename the signal to match it.
2023-02-25 13:15:06 +00:00
Vlad Zahorodnii
65c7abd8fb kcms/xwayland: Remove unused include
It fails to build with KF6.
2023-02-25 12:20:27 +00:00
Vlad Zahorodnii
10a25b2d75 aurorae: Ensure that the plugin so file name matches plugin id
KPluginMetaData::findPluginById() in KF6 uses the file name to find plugins.
2023-02-25 11:33:59 +00:00
Vlad Zahorodnii
282e2dfbde Ensure that the current virtual desktop cannot be null
VirtualDesktopManager::currentChanged() can be emitted with
previousDesktop being null/0. It can happen only on startup. After that,
it's always valid. In order to make the code that uses the
currentChanged signal less trickier, ensure that the current virtual
desktop is initialized when the virtual desktop config is loaded.
2023-02-25 11:50:23 +02:00
Vlad Zahorodnii
1854224c17 effects/zoom: Fix crash on X11
On X11, the painted screen is meaningless, so the zoom effect doesn't
use it to store offscreen data. It can create problems when iterating
over offscreen data map.

The painted screen can't be used to determine the necessary offscreen
texture size too. X11 requires some special care.

This change adds explicit wayland checks.

BUG: 466376
2023-02-25 08:49:07 +00:00
l10n daemon script
a6df113690 GIT_SILENT Sync po/docbooks with svn 2023-02-25 03:26:50 +00:00
l10n daemon script
4df8d73fc4 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-02-25 02:07:07 +00:00
Alexander Lohnau
34008b9dbd Use KPluginMetaData::fileName instead of KPluginMetaData::metaDataFileName
In KF6, the latter does not exist anymore and without desktoptojson compat code in KPackage, the values are the same anyway
2023-02-24 16:17:38 +01:00
David Redondo
693ea96599 Fix edid serial parsing
Descriptor blocks are 18 bytes, the serial number one has space
for 13 bytes of serial number.
BUG:466136
FIXED-IN:5.27.2
2023-02-24 11:06:02 +00:00
Vlad Zahorodnii
03e098204f Port Workspace::sendWindowToDesktop to VirtualDesktop 2023-02-24 10:32:41 +02:00
l10n daemon script
705885b203 GIT_SILENT Sync po/docbooks with svn 2023-02-24 02:26:30 +00:00
Vlad Zahorodnii
711b6e36d2 effects/zoom: Fix rendering with mixed scale factors
When allocating offscreen texture, we should use screen's scale rather
than current render target's scale.

In addition to that, the cached vbo cannot be used for rendering on
other screens with different scale factors, which can happen.
2023-02-23 23:19:36 +00:00
Vlad Zahorodnii
a62dc13161 effects/magnifier: Reduce the number of heap allocations
Reserve enough of space for all vertices instead of dynamically
expanding the QVector to accommodate for new data.
2023-02-23 23:04:33 +00:00
Vlad Zahorodnii
42cff94f72 effects/magnifier: Fix rendering on multi screen setups
The projection matrix is constructed incorrectly, use the one provided
by the scene instead.
2023-02-23 23:04:33 +00:00
Vlad Zahorodnii
0dec5e3f20 Merge Window::client{Minimized,Unminimized} with Window::minimizedChanged
This merges Window::clientMinimized() and Window::clientUnminimized()
signals with the Window::minimizedChanged() signal to simplify some
code.

The avoid animation flag has been dropped because its main usage is to
avoid playing animation during window initialization. But it's not possible
to trigger minimize animation at that moment. API-wise it's better to avoid
having such flags too and rely on surface role to decide whether to play a
given animation.
2023-02-23 22:33:26 +00:00
Vlad Zahorodnii
84521ddb18 Use setMinimized() during window initialization
If setMinimized() is used during window initialization, no animation
will be played, so we could use setMinimized() instead of minimize()
that takes "avoid animation" boolean trap.
2023-02-23 22:33:26 +00:00
Vlad Zahorodnii
b53621136d Drop Window::desktopPresenceChanged()
This signal exists as a convenience helper, but it's not always emitted
as it's advertised to work. Instead of fixing it, let's drop the signal
to simplify virtual desktop code. Its effects can be accomplished by
monitoring Window::desktopChanged() and VirtualDesktopManager::currentChanged()
signals in effects and scripts where needed.
2023-02-23 22:10:37 +00:00
Aleix Pol Gonzalez
a60c3130e3 backends/drm: Make sure attributes are always initialized
It only gets set on specific cases and assumes false as default anyway.
kwin/src/backends/drm/drm_gpu.cpp:691:12: runtime error: load of value 190, which is not a valid value for type 'bool'
2023-02-23 21:52:01 +00:00
Xaver Hugl
5f0ea95bfa backends/wayland: fall back to qpainter when there's no render node
While we could still access the primary node, as we're not getting GPU acceleration
anyways we might as well fall back to CPU rendering directly

BUG: 466302
2023-02-23 19:46:19 +01:00
Vlad Zahorodnii
017bb6d3c8 scripting: Drop Window.desktop property 2023-02-23 16:41:30 +02:00
Vlad Zahorodnii
ecb58c987f scripting: Drop Window.x11DesktopIds property 2023-02-23 14:25:02 +00:00
Aleix Pol
150b098ba7 screencasting: Minimise pixel format conversions while streaming
Instead of best-guessing, at BGR (which in retrospect was a bad guess),
offer whatever resembles most the internal representation. This way the
frame gets to be least treated as it goes into the client.
2023-02-23 14:11:41 +00:00
Harald Sitter
4fcc545628 backends/x11: explicitly free the outputs
...before releasing the connection!

this was randomly causing crashes because of use-after-disconnect
problems. since we would tear down the connection in ~X11WindowedBackend
but outputs wouldn't get cleaned up until QObject children cleanup of
the X11WindowedBackend object (or more precisely the OutputBase). this
would then result in ~X11WindowedOutput accessing a backend connection
that had already been closed

to help debug this type of problem moving forward let's also reset the
connection to nullptr during destruction. it's kinda pointless but it
makes it easier to spot use-after-disconnect

BUG: 466183
2023-02-23 13:50:00 +00:00
Vlad Zahorodnii
08e392f368 Revert "wayland: Update shadow immediately"
This reverts commit 4b1ef33c1e.

It introduced a crash. The large icons task switcher can create and
destroy the shadow in the middle of painting. When a shadow is
destroyed, kwin can make opengl context current. It will reset current
QOpenGLContext, and QtQuick can crash.

BUG: 466279
2023-02-23 12:48:11 +00:00
Vlad Zahorodnii
a2062090eb Rename interactive move resize lifecycle signals
Add the "interactive" word to be consistent and put "started",
"stepped", and "finished" at the end of signal names where they are more
expected.
2023-02-23 11:38:34 +00:00
Vlad Zahorodnii
8bb2d52972 Rename Window::clientMaximizeStateChanged signal
Make it shorter to be more readable.
2023-02-23 09:17:47 +00:00
Vlad Zahorodnii
88c974835c Drop duplicate clientMaximizedStateChanged signal 2023-02-23 09:17:47 +00:00
Vlad Zahorodnii
7f4071c7d4 Drop Window::addWorkspaceRepaint
It's used only by window elevation logic, but it can be moved inside
libkwineffects. It should also fix missing repainting in scripted effects.
2023-02-23 07:40:26 +00:00
l10n daemon script
911138f9db GIT_SILENT Sync po/docbooks with svn 2023-02-23 02:30:03 +00:00
l10n daemon script
5d60f218d4 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-02-23 02:01:06 +00:00
Vlad Zahorodnii
da26deaa5c backends/libinput: Fix crash upon receiving motion absolute events
The input events can be processed when the workspace is not available,
e.g. during startup or shutdown, so add a corresponding guard.

As a long term plan, we need to decouple Workspace from low-level input
backend parts, but it will be a too invasive change for now.

BUG: 449317
BUG: 465456
2023-02-22 21:39:14 +02:00
Xaver Hugl
520fa3042a pointer input: always confine pointer to screens
Checking if the pointer needs to be confined before doing `std::clamp` on
the position is useless and causes problems. With this change, the pointer
will always be confined to exactly the screen, without any fractional offsets.

BUG: 461911
2023-02-22 19:01:22 +00:00
Vlad Zahorodnii
4b1ef33c1e wayland: Update shadow immediately
Updating OpenGL textures no longer takes place immediately.
2023-02-22 14:53:26 +00:00