If the user is currently typing, do not highlight windows based on the mouse position. If the user types a window title before the effect opening animation is finished, he ends up in a situation where only one window is on the screen but it is deselected (because the mouse is not on the window) or another window is selected because of the mouse. With this change, the mouse input does not overwrite the window highlighting based on the search entered **if the user is currently typing.**
As the placeholder output gets added or removed in response to other outputs
getting enabled or disabled, the output list may change while iterating over
them and applying changes.
BUG: 448454
BUG: 448474
CCBUG: 448697
FIXED-IN: 5.24
Currently, finishInteractiveMoveResize() relies on a hidden behavior
in the sendToOutput() function that makes it treat fullscreen windows
differently, which is confusing.
With this change, finishInteractiveMoveResize() will use the
checkWorkspacePosition() function to make sure that the geometry of the
fullscreen window is adjusted to the new monitor. It allows to make
sendToOutput() more straightforward.
It also fixes checkWorkspacePosition() using wrong geometry type in the
fullscreen window path.
A while ago, geometryRestore() had to have a sane value even if the
window is not maximized because checkWorkspacePosition() used it.
Since checkWorkspacePosition() doesn't use geometryRestore() anymore, we
can stop updating the geometry restore.
geometryRestore() is no longer updated after mapping the window, so
setQuickTileMode() has to update geometryRestore() explicitly to the
correct value.
With this change, geometryRestore() will be updated as follows:
* if the window is tiled, geometryRestore() is valid, nothing to do
* the window has been dragged to the top edge, set geometryRestore() to
the geometry that the window had when starting move
* otherwise, use the current move resize geometry
After calling setMaximize(), the window should cover the maximize area.
The commit message of 516ea86341 doesn't
explain why only the y coordinate is enforced or why the x coordinate is
not enforced.
In order to make some sense of the code, this change removes the semi-
random enforcement of the y coordinate.
If the window is inactive and it enters fullscreen mode for some reason,
it can create a situation where keyboard goes to a window occluded by
the fullscreen window.
This change makes XdgToplevelClient::setFullScreen() not raise the
window. It's the responsibility of whoever requested the fullscreen mode
change.
If the configure event is acknowledged, the window's stack layer will be
invalidated and recomputed. If the window is active, it will be promoted
to the ActiveLayer, otherwise its stack position won't change.
dontInteractiveMoveResize() was added to workaround kwin sending bad
configure events when double clicking mpv to make it fullscreen.
With async geometry updates fixed, dontInteractiveMoveResize() can be
finally removed.
Another reason to remove dontInteractiveMoveResize() is that it can make
kwin crash with a debug build. For example, if you enable resizing
maximized windows in breeze decoration settings and resize a maximized
window, kwin would eventually crash in
the AbstractClient::handleInteractiveMoveResize() function because neither
isInteractiveMove() nor isInteractiveResize() return true.
Based on the implementation of wl_display_connect, WAYLAND_SOCKET is
always preferred over WAYLAND_DISPLAY, which means it is OK to have both
of them set. This allows subprocess of input method to have the correct
WAYLAND_DISPLAY variable set.
As formats are per output and also checked on crtc changes, there
is no reason to restrict used formats to those that are supported
by all primary planes anymore.
When the crtcs get switched around between outputs, their primary
planes and thus the supported formats also get switched around. In
order to make sure that doesn't cause any problems, always check
whether or not the format+modifiers used are supported.
Otherwise animated cursors won't work. Hopefully, this will fix pointer
input test.
It would be great to refactor cursor handling so it's simpler, it can be
done later.
Userspace is expected to do a modeset and set link-status to good again,
if link-status gets bad. This is needed to prevent some black screen situations.
BUG: 448177
This was deprecated in during the 5.24 development period. All KDE
consumers are ported away from it. Third parties will get meaningful
runtime messages which instruct them to register the plugins without keywords.
The create overloads which take keywords were already deprecated in KPluginFactory.
Currently, the invert effect doesn't work because it can't load its
fragment shader because builtin effects are static libs. We need
Q_INIT_RESOURCE() before reading shader code.
This modularizes builtin effects more, which makes easier to add and
remove builtin effects, as well as allows to have per effect resources.
Technically, changing the inner workings of the ShaderManager is an
API incompatible change, but ShaderManager::generateShaderFromResources()
can be used only by builtin effects so it's okay.
ShaderManager::generateShaderFromResources() had to be changed because
two resource files can't share the same prefix. Appending "_core" was
inspired by QtQuick.
We need CMAKE_INSTALL_FULL_LIBEXECDIR, otherwise `lib/x86_64-linux-gnu/libexec/kwin-applywindowdecoration`
will be the resulting path, which does not contains the cmake install prefix.
Consequently KNS would fail to find it at runtime.
BUG: 447284
FIXED-IN: 5.24.0
After finishing interactive resize, the window needs to be gravitated.
However, it won't be gravitated because isInteractiveMoveResize() will
return false.
In order to fix that, every configure event needs to carry the gravity,
that way the window can be gravitated even after leaving interactive
resize.
The gravity concept is a generic way to describe how a window must be
positioned during interactive resize. It works both when resizing the
window using a pointer or touch.
X11Client implicitly relied on the finishInteractiveMoveResize() function
to call moveResize() to synchronize the move resize geometry with the
server geometry. However, after removing that moveResize(), X11Client
got slightly broken.
A resize sync request may arrive shortly after finishing resize. In
order to properly handle it, this change makes X11Client handle late
sync requests.
It also makes handling interactive resize on x11 similar to how it's
done on wayland.
The main problem with not letting X11Client finish interactive resize
is that the Toplevel::bufferGeometry() may end up with an outdated value
and SurfacePixmapX11 will fail to create due to a mismatch between
Toplevel::bufferGeometry() and the server side geometry of the frame
window.
KWin loads glGetGraphicsResetStatus() on its own to handle ARB and EXT
extensions. After moving graphics reset handling to the RenderBackend,
kwin doesn't use its own glGetGraphicsResetStatus() function, but instead
uses the one provided by libepoxy, which panics if
glGetGraphicsResetStatus() is not in core spec. This change makes the
OpenGLBackend use kwin's glGetGraphicsResetStatus() function instead of
the one provided by libepoxy to avoid a crash.
This adds support for reading values from a "Libinput/Defaults" group in
the input config file. This allows specifying global defaults for
devices, that are preferred over the libinput defaults. Because of the
cascading mechanisms of KConfig, this then allows distributions and
hardware vendors to supply system-wide defaults for devices.
Rather than an awkward combination of template functions, function
pointers and multiple calls to almost-the-same-but-not-entirely
functions, make ConfigData itself a template and use type erasure to
store them in the config map. This makes the data object aware of its
type and allows us to specialise the reading of config values through
template specialisation. It also removes the need for multiple
constructors and setters in the ConfigData object.