Amends cc06f62749.
Snap to the maximize area to be consistent with the interactive move mode.
(cherry picked from commit 2670620059)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
QFileDialog::getOpenFileName uses a nested event loop, which can break QML
Instead make the code properly asycn
SENTRY: SYSTEMSETTINGS-44P
(cherry picked from commit 646d9023e7)
Co-authored-by: Nicolas Fella <nicolas.fella@gmx.de>
We must update the seat timestamp before notifying it about a touch down
event.
(cherry picked from commit 0b0c54866c)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
A lot of code in KWin expects the scene context to be current, so if the render time query changes the
context, that code can misbehave severely.
(cherry picked from commit 23c7f5d474)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
This adds the orange highlights of which settings are changed within the
KCM.
The KCFG file is modified as QML bindings automatically convert
properties to lowerTitleCase, but then the settingName in the
SettingStateBinding is not and people spend ages debugging it. Writing
it explicitly makes it clearer. The config file format is unchanged.
BUG: 479019
(cherry picked from commit a4856a015b)
Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>
Otherwise, unmaximizing the window will move it to a different screen than it's
currently on, which is confusing
BUG: 489488
(cherry picked from commit dadf3f3a97)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
The crtc in the drm pipeline may change between a pageflip being requested and the
pageflip event happening. If it does change, it could change to a nullptr, in which
case KWin would then crash.
This should fix https://crash-reports.kde.org/organizations/kde/issues/4603
(cherry picked from commit 34b830f87b)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
When effects get deleted, they might call EffectsHandler::isColorPickerActive,
which checks the list of loaded effects. With the previous code, that would access
the already-deleted effects in the list, leading to crashes like
https://crash-reports.kde.org/organizations/kde/issues/37390/
To fix that, this commit moves things around so that effets lists are cleared first,
and effects are only deleted afterwards.
(cherry picked from commit 1eb926d715)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
This helps us to prevent writing data outside the boundaries of the
destination buffer.
(cherry picked from commit 8cc7816f50)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
This is to make XdgToplevelWindow code less crashy if somebody checks
whether a closed window is resizable, etc.
(cherry picked from commit e19f6f4ee2)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
If the "Search results include filtered windows" is off, only show
WindowHeap if there is no search text inputted.
BUG:493112
FIXED-IN: 6.2.0
(cherry picked from commit a8deb69230)
a8deb692 overview/main.qml: Hide WindowHeap when searching if filterWindows setting is toggled off
Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>
Using some other graphics API like Vulkan for QtQuick
together with OpenGL is not not supported and can lead
to crashes.
BUG:493008
FIXED-IN:6.2
(cherry picked from commit 2fb02e79c5)
Co-authored-by: David Redondo <kde@david-redondo.de>
Adding Kirigami.Units.smallSpacing and Kirigami.Units.largeSpacing
to bottomMargin adds enough space to avoid items from overlapping
when there are a lot of windows open.
BUG:493253
FIXED-IN: 6.2.0
(cherry picked from commit 7280687036)
glReadnPixels() is a safer version of glReadPixels() because it has
bounds checks.
(cherry picked from commit 19aa885324)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
It may happen that the specified app id is a file path to a binary file.
In which case, the findDesktopFile() function will return that file path
and KConfig will try to parse a binary file.
On other hand, the findDesktopFile() function should ideally always
append the ".desktop" suffix. If there's no file with such a file name,
nothing should be returned. But due to some Qt applications providing app
ids with the ".desktop" suffix, the findDesktopFile() function also tries
to find a desktop file without appending the ".desktop" suffix. However,
the fallback code doesn't actually try to verify that the desktop file
name contains the ".desktop" suffix, which can result in the
findDesktopFile() function providing values that it shouldn't. In this
case, returning the file path to a binary executable.
BUG: 492584
(cherry picked from commit f3f2a338d4)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
If the graphics buffer cannot be mapped, handle it more gracefully by
not creating the corresponding slot and yelling about it in the logs.
(cherry picked from commit 88db009083)
Do not decide on the output when the window is empty, contains won't
report empty rects. We'll be sending leave events unnecessarily.
Make sure we don't pass unexisting outputs.
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
(cherry picked from commit 45feca5df4)
Co-authored-by: Aleix Pol Gonzalez <aleix.pol_gonzalez@mercedes-benz.com>
There's only two cases where a pipeline can be destroyed:
- hotunplug of a display, in which case DrmGpu already waits for all pipelines to be idle
- hotunplug of a GPU, in which case the pageflip events are safely ignored
In the latter case, it can happen that a pending pageflip event will never arrive, so it's
not just unnecessary but actively harmful to wait for the pageflip event.
(cherry picked from commit 87b3541766)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
The code after sleeping relies on m_commits not being empty, but if the main
thread modifies it, that might not be the case
(cherry picked from commit f578483d93)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
Polling for drm events works for waiting on pageflip events, but if there's commits
scheduled for future submission, and that fails, no pageflip will ever arrive.
To fix that, this commit ensures at least one commit is actually submitted to the
kernel before polling for pageflip events.
BUG: 492167
(cherry picked from commit 33ad107fa1)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
As we opportunistically use KMS outside of ICC profiles to apply night light,
we need to explicitly set the shader fallback option to make it be applied in
shaders instead.
BUG: 492890
(cherry picked from commit 5fde036d74)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
This reverts commit b708a93c1e.
The crashes in BlurEffect::prePaintWindow() continue occurring without
tripping this code, so the culprit must lie elsewhere.
(cherry picked from commit 0f78a2725d)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
If a focussed window is to a new virtual desktop we need to update focus. It
does not make sense for focus to remain on a now-invisible window. This patch
re-uses the same path as when virtual desktop is changed.
BUG: 481574
(cherry picked from commit b96e6cf0b3)
Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>
When we change a Virtual Desktop for a window there are implications on the
stacking order and focus. We need to separate the low level action of
updating just the window and the more general request.
(cherry picked from commit de59a15efe)
Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>
Focus tracking with accessibility APIs is disabled on Wayland because it causes hangs, but we
can at least warp the pointer to the active window instead of (0, 0)
BUG: 493217
(cherry picked from commit c3ed817ef4)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
When TabBoxHandler::createModel() gets called, it must reset
lastRaisedClient and lastRaisedClientSucc if they are closed windows.
But the createModel() function currently doesn't do it, which can
eventually lead to accessing dangling pointers in
TabBoxHandlerPrivate::updateHighlightWindows().
Besides that, there are a couple more cases where closed windows
need to be filtered out when processing the stack.
(cherry picked from commit ff2b424e06)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>