Edge::window()/Edge::approachWindow() is an X11 implementation detail.
(cherry picked from commit 9d419ea5fe)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Workspace::adjustWindowPosition() properly handles hidden windows and it
also excludes more window types, but Workspace::adjustWindowSize() only
shares a small fraction of those checks due to getting out of sync because
of code duplication.
BUG: 461987
(cherry picked from commit 260319c30f)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Currently, when a cancel() is called for a cross-fade animation, the
window will not be unredirected.
BUG: 488893
CCBUG: 486023
(cherry picked from commit c4116173aa)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Some hooks need to run on X11 startup.
On X11 this is handled by the login manager, for XWayland this is the
responsibility of the desktop.
Long term, we want Plasma to make XWayland actually on demand and therefore we
should use the initfd for these startup scripts before the application connects.
BUG: 493054
(cherry picked from commit ce8927c938)
Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>
While the xdg shell specification says otherwise, in practice we have apps that
are translucent and expect that to work in fullscreen. More importantly, if we
don't enforce opaqueness with GPU compositing, we shouldn't do it in scanout either
BUG: 493222
(cherry picked from commit 274ef5c973)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
Input redirection doesn't have the pointer buttons on X11, so it can't be relied on
there
(cherry picked from commit a217484be7)
Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
A closed window cannot react to new geometry, also requesting new
geometry can involve accessing resources that are gone/deleted now.
Scripts trying to move or resize a closed window is a bug though.
BUG: 492213
(cherry picked from commit f339c4281f)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
This rule is still useful for Xwayland windows, for Wayland native
windows it is indeed useless, the ui can be polished later, if needed.
(cherry picked from commit e197540c2b)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Amends e482556d58.
The client() check was accidentally lost in the linked commit.
BUG: 474873
(cherry picked from commit f9ff283f95)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
This ensures that the window is always alive as long as the sheet
effect animates it.
(cherry picked from commit bd9c81c6cd)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
There might be more XdndStatus client messages after a drop occurs. In
which case avoid sending XdndDrop client message again as it can result
in a feedback loop with clients such as GIMP.
BUG: 482298
(cherry picked from commit 48faf8314d)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
This is not automatically pulled in on Musl and without it dev_t is
undefined
(cherry picked from commit 77508939e6)
Co-authored-by: Bart Ribbers <bribbers@disroot.org>
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>