Currently, a tiled window will be untiled when you start interactive
resize. But there are clients that start interactive resize as soon as
they receive a button press around their edges, e.g. Firefox, which
results in unexpected untiling. Another argument is that it makes
interactive resizing and interactive move consistent, they both would
untile the window after explicit user input.
BUG: 470687
(cherry picked from commit 1e81fcb9be)
The only reason for handling them is that the effect grabs the keyboard, which disables
global shortcuts on Xorg.
In the Wayland session though, global shortcuts still work while the effects are active,
and usually that works fine, as the global shortcuts filter filters out the key press events
before they reach the effect. Modifier-only shortcuts though trigger on release, so they
don't get filtered out and the shortcut effectively gets triggered twice, once by the effect
on press, and once by kglobalacceld on release.
BUG: 493589
(cherry picked from commit ff2566562d)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
There have been many reports that enabling HDR on NVidia can lead to KWin's atomic commits
being rejected on login, which means KWin can't display anything. To prevent users from
falling into that trap, this commit disables the colorspace capability unless the
KWIN_DRM_ALLOW_NVIDIA_COLORSPACE=1 environment variable is set.
This commit should be reverted once the driver problem causing the issue has been fixed.
CCBUG: 488941
(cherry picked from commit 67d9529951)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
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>