We need to schedule a workspace repaint in case no effect is going to
animate the window.
The workspace repaint is issued before creating a Deleted because the
latter takes the owner of the effect window, which means that after an
instance of Deleted has been created, visibleRect() returns the frame
geometry.
CCBUG: 425294
If an X11 event filter has been activated and it unregisters another X11
event filter, then the window manager may crash because the foreach macro
in Workspace::workspaceEvent() makes a copy of m_genericEventFilters or
m_eventFilters and we can call the event() method for an already defunct
filter.
With this change, X11 event filters can be safely removed and installed
at any particular moment.
BUG: 423319
By marking as part of graphical-session we get a more graceful shutdown.
Also switched to explicit restart inside the unit. Originally I did this
with drop-ins, but this complicates wayland for now.
If the opaque area covers all the window's shape, it means that it's an
opaque window.
This is how GTK presents opacity right now, so we'll get to skip
rendering under GTK clients and other compatible ones.
Qt is still not emitting opacity.
The main motivation for this change is to enable support for our
proprietary shadow protocol in LayerShellV1Client.
Previously we couldn't move code that handles shadows in WaylandClient
because WaylandClient::bufferGeometry() was a pure virtual method.
This reverts commit 9d4c8fda09.
Unlike other effects this wasn't using hide/show as a hack for not
having a created/destroyed signal but because the window is internally
hidden when it's in auto-hide mode despite being still mapped.
BUG: 426686
Currently, if kwin/wayland runs without xwayland, the order in which
windows are painted doesn't actually reflect the true stacking order.
If the stacking order has been changed, we need to invalidate the
cached x stacking order. But it's done only when RootInfo is present.
If Xwayland doesn't run, RootInfo is not available and thus window
raising is completely broken.
With this change, the x stacking order will be invalidated every time
some window has been raised, no matter what mode kwin operates in.
If showOnScreenEdge is called, immediately followed by the client's destruction, it's possible that the next event queue process will call raiseClient with a destroyed client.
We avoid this by using singleShot that is lifetime-aware.
This change replaces the remaining usages of the old connect syntax with
the new connect syntax.
Unfortunately, there are still places where we have to use SIGNAL() and
SLOT() macros, for example the stuff that deals with d-bus business.
Clazy was used to create this change. There were a few cases that needed
manual intervention, the majority of those cases were about resolving
ambiguity caused by overloaded signals.
Currently, we do some sort of window placement only for decorated
internal windows, which feels hacky.
With this change, all internal clients will go through the window
placement code, unless it's a popup or the BypassWindowManagerHint
flag is set.
If the BypassWindowManagerHint flag is set, the window must have
valid position.
CCBUG: 400675
Currently, whenever the focused text input surface changes, the virtual
keyboard will create a bunch of excessive connections. This is leftover
after the old design.
No need to create x_stacing by iterating over stacking_order, it can be
copied. We are not performing any operations over it.
Also no need to instanciate the tree until we want to use it.
Uses a setter and clear method pattern rather than having the code
repeated.
Instead of keeping a QPointer, now we are a QObject and we get notified
about destruction intention directly, so we can clear the pointer when
necessary.
Instead of looping through the rects in the region, emit the region at
bulk. It reduces the amount of emissions we do and allows us to pack the
response accordingly.
Instead of putting code in lambda put them in actual slots, this is
right now not useful but when e.g. TextInputV3 is implemented, this way
we can re-use them.
This also simplifies the code little bit and makes it easier to use with
gdb if needed.
subsurfaceTreeChanged is emitted on every damage event. This makes it
very noisy and the model constantly resets. This makes it impossible to
expand the tree (as it resets immediately after).
SubSurfaceMonitor gives us more granular signals whilst handling the
recursive aspect.
Also there are no unmanaged windows that are wayland surfaces, so they
are simplified.
Edge::handle calls showOnScreenEdge, which (on wayland) eventually calls internalShow, which eventually calls ScreenEdges::reserve, which destroys the same edge.
When showScreenOnEdge returns, 'this' has been freed.
Using a singleshot timer allows Edge::handle to return before the Edge is destroyed.