If there's only one configure event that changes the position of the
window and it gets acknowledged but no buffer is attached yet, and a new
configure is sent, then the ConfigurePosition flag won't be inherited
by the new configure event and the window will be misplaced.
In order to fix that, this change makes XdgSurfaceClient pop the last
acknowledged configure event from the m_configureEvents list only when
it's about to be applied for sure.
BUG: 448856
Encoders are not really relevant for the test result, except that one of
the encoders for the connector must be compatible with the crtc.
The kernel usually exposes only a single encoder per connector for this
reason, but if a driver exposes multiple then that means KWin will do a
lot more tests than is necessary.
In order to prevent that from happening, do fewer syscalls and simplify
code, only check supported encoders once per connector.
When setting the default value for `ElectricCornerRatio` in the UI form
we also need to update the default indicator for this field.
*Default value for this setting is 25%*
| BEFORE | AFTER |
|---|---|
|![screenedges_25_before](/uploads/2e9f21627cc05cd12fd45ec1a019b89e/screenedges_25_before.png)|![screenedges_25_after](/uploads/7106341983e4cce0a4fb26000fb8583f/screenedges_25_after.png)|
BUG: 448886
FIXED-IN: 5.24
Historically, noBorder() was used for two things:
* as a substitute for AbstractClient::isDecorated()
* to determine whether the AbstractClient should have a decoration
With async decoration updates refactoring, a few things around
noBorder() have changed, which exposed an existing bug in the handling
of borderless maximized windows.
It's possible to have a case where an initially maximized window makes
an xdg_toplevel.set_maximized request before the initial commit, but
creates the decoration object after the initial commit.
Since XdgToplevelClient::userCanSetNoBorder() would return false when
maximize() is called in XdgToplevelClient::initialize(), m_userNoBorder
won't be updated and therefore the window can end up having a server
side decoration.
Previously, it wasn't the case because kwin would do nothing if the
decoration is installed and its preferred mode changes after the initial
commit but before the surface is mapped. With async decoration fixes,
kwin would react as expected, which unfortunately has exposed the bug.
The root cause of the problem is the fact that noBorder() is overloaded,
which makes it error-prone.
This patch changes how the noBorder property is treated. Now, it only
indicates whether the compositor wants the window to have no borders. If
noBorder() is true, it means that the compositor doesn't want the window
to have a server-side decoration; on the other hand, if noBorder() is
false, it doesn't imply that the window should have a decoration.
BUG: 448740
X11Client can grab pointer when starting interactive move or resize so
all pointer events go to it and kwin can update the move resize geometry
based on the current interactive move-resize mode.
However, on Wayland, X11Client::motionNotifyEvent() is disabled and
pointer events go through a code path that requires no X11 pointer grab.
This signal is sent back to the ksldapp after the greeter has registered
a window with the compositor. Only once ksldapp gets this signal does it
release the lock delaying suspend.
With xdgshell/layershell we have a roundtrip of configuring before the
window is even exposed, so we move to a different signal. This also
helps encapsulate lockscreen code.
Ideally we want to add code tracking frame rendering per screen tracked
too, but that would be based off this change.
CCBUG: 316734
On wayland cursors are managed by kwin. During a move resize operation
kwin updates its own cursors in pointer_input. There is no need to sync
any cursor changes back to the X server as we end up setting it twice.
This file was written before we understood and fixed Wants and After.
See readme in plasma-workspace/startkde/systemd for details. Workspace
was fixed, kwin is in another repoistory and got missed.
This causes potential for things like font DPI to not be exported.
19c471405e7eb4b6026db24d776d205125dbc013 introduced a regression if
there are two gbm backend and the backend fail to choose drm format.
This fix does two things:
1. Current buffer format should not be reset after create new buffer,
otherwise current.format may just be empty after resetOutput.
2. force xrgb 8888 need to be set on the primary backend.
BUG: 448790
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.