24201 Commits (18870f67cc94573fadb6bccd46419c1ebc7ae949)
 

Author SHA1 Message Date
Vlad Zahorodnii 18870f67cc x11: Fix client area lookup with pending move resize
If there's a pending move resize, Window::output() won't be updated
until geometry updated are unlocked. We need to use moveResizeOutput()
instead.
2 years ago
l10n daemon script 074a4fd286 GIT_SILENT Sync po/docbooks with svn 2 years ago
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"
2 years ago
Vlad Zahorodnii 2dc7364a23 effects: Drop WindowHeap.windowClicked signal
Put a TapHandler in WindowHeapDelegate instead.
2 years ago
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
2 years ago
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.
2 years ago
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.
2 years ago
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
2 years ago
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.
2 years ago
l10n daemon script 6745cb87ec GIT_SILENT Sync po/docbooks with svn 2 years ago
Vlad Zahorodnii 53b0dc3a5d Unify Window::killWindow() for unmanaged windows 2 years ago
l10n daemon script 944bff100e GIT_SILENT Sync po/docbooks with svn 2 years ago
Vlad Zahorodnii 351cf8b585 Drop Window::setDesktop()
It's unused.
2 years ago
Vlad Zahorodnii cd4d04c683 Move X11 specific code in Window::setDesktops() to X11Window 2 years ago
Vlad Zahorodnii 3809a2712b tabbox: Remove unused arg in DesktopChainManager::addDesktop() 2 years ago
Vlad Zahorodnii d79a4a1daa Make VirtualDesktopManager::currentChanged pass VirtualDesktop
It fixes the remaining usage of int desktop ids in Workspace, ignoring
Workspace::setInitialDesktop().
2 years ago
Vlad Zahorodnii 9ea839eb03 libkwineffects: Add missing QQuickRenderControl::{beginFrame,endFrame} calls
As QQuickRenderControl docs state, beginFrame() and endFrame() must
enclose sync() and render() calls.
2 years ago
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().
2 years ago
Vlad Zahorodnii ad330924e2 Rename Window::desktopChanged()
We have Window::desktops(), so rename the signal to match it.
2 years ago
Vlad Zahorodnii 65c7abd8fb kcms/xwayland: Remove unused include
It fails to build with KF6.
2 years ago
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.
2 years ago
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.
2 years ago
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
2 years ago
l10n daemon script a6df113690 GIT_SILENT Sync po/docbooks with svn 2 years ago
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"
2 years ago
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
2 years ago
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
2 years ago
Vlad Zahorodnii 03e098204f Port Workspace::sendWindowToDesktop to VirtualDesktop 2 years ago
l10n daemon script 705885b203 GIT_SILENT Sync po/docbooks with svn 2 years ago
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.
2 years ago
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.
2 years ago
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.
2 years ago
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.
2 years ago
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.
2 years ago
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.
2 years ago
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'
2 years ago
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
2 years ago
Vlad Zahorodnii 017bb6d3c8 scripting: Drop Window.desktop property 2 years ago
Vlad Zahorodnii ecb58c987f scripting: Drop Window.x11DesktopIds property 2 years ago
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.
2 years ago
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
2 years ago
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
2 years ago
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.
2 years ago
Vlad Zahorodnii 8bb2d52972 Rename Window::clientMaximizeStateChanged signal
Make it shorter to be more readable.
2 years ago
Vlad Zahorodnii 88c974835c Drop duplicate clientMaximizedStateChanged signal 2 years ago
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.
2 years ago
l10n daemon script 911138f9db GIT_SILENT Sync po/docbooks with svn 2 years ago
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"
2 years ago
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
2 years ago
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
2 years ago