While the changes made earlier prevent enqueueing buffers when the
stream is not in a streaming state, screencasting continued to crash.
The reason for that seems to be that pipewire will, in certain cases,
invalidate some buffers, including the buffer that we are currently
tracking as "pending buffer". The result of this is that when we then
try to enqueue that buffer, we get a crash.
To prevent this, discard the pending buffer when the stream state
changes. Since that makes the pending fence useless as well, also
discard it and its notifier.
After porting the desktop background window to the layer-shell protocol,
the desktop window is not raised up in the stack anymore when the
showing desktop window is activated. The main reason to avoid this is to
avoid fighting and overriding layer shell logic.
As another way to implement the show desktop mode, this change makes the
workspace hide windows that don't belong to desktop.
It's a better solution for a couple of reasons: "keep above" and other
overlay windows will be properly hidden and it lets us avoid touching
the stacking order.
BUG: 387593
BUG: 406101
BUG: 469827
Currently, X11Window emits Window::windowShown and Window::windowHidden
signals differently than the WaylandWindow. On the other hand, at quick
glance, there's no reason why it has to work like this, so let's make
X11Window behave similarly to WaylandWindow. This lets us simplify code
and potentially unvirtualize Window::isHiddenInternal() in the future.
It also makes X11Window::internalHide and X11Window::internalKeep more
reusable as it doesn't handle focus anymore.
…to avoid the "two stacked rows of buttons" effect.
Changes "Get New" button text to avoid redundancy because title already
contains the "Script" word in it.
Using the peak maximum brightness can cause displays to do more agressive tone mapping, which
overall darkens the image without any reason. Instead, send the max fame average brightness,
which the display can always do over the whole screen
We have a few crash reports that point to m_windows getting out of sync
with reality. Add some additional checks in the hope they point to
something useful.
Window screen edge reservation relies on Window::showOnScreenEdge()
getting called when the screen edge can't be reserved. That makes screen
edge code not easy to follow.
This change makes ScreenEdges::reserve() indicate if a screen edge has
been successfully reserved and delegate error handling to the user.
In most cases, if a screen edge has not been successfully hidden, you
just need to avoid calling hideClient() and wait until the next moment
when the window can be hidden again. Note that it differs from the
current behavior but it's for a good reason. If the panel can't be
hidden now, the panel has no idea how to handle it; only the compositor
knows when it can be hidden again.
When a window is deleted it all "set" operations should no-op.
As for the bug specifically, we have an effect that keeps the desktop
alive. If a user calls showDesktop not only do we not update the
stacking order, we also call updateLayer when the client closes this is
after the window is in the deleted state.
BUG: 470067
The Effects API has one signal screenEdgeApproaching with effects
monitoring the last signal to stay in sync.
If an Edge is destroyed whilst visible, effects currently do not get
notified and it can stay there forever.
This patch emits screenEdgeApproaching if appropriate with a factor of 0
when an edge is destroyed.
BUG: 403354
This lets Plasma itself control the position of popup windows such as
Plasma tooltips. transientPlacement() now returns the position set by Plasma
if available.
BUG: 463272
StrutsTest::testLeftScreenSmallerBottomAligned() used to pass because
one of the previous tests changes the maximize policy to maximize.
A window will be maximized only if it's larger than the maximize area
but smaller than the screen area. That's not the case and the test makes
an incorrect assumption about how X11Windows are placed.