Xwayland will re-create the wl_surface object if the X11 window is
unmapped and mapped. That, and the fact that the order in which the
WL_SURFACE_ID client message event is received and the wl_surface object
is created is undefined can cause the following bug:
* WL_SURFACE_ID is received
* the old wl_surface object is destroyed, m_surfaceId is reset to 0
* new wl_surface is created but because m_surfaceId is 0, it won't be
associated with the x11 window
This change ensures that kwin will associate the wl_surface with x11
window by making it not reset cached surface id when the old wl_surface
is destroyed.
However, we cannot leave m_surfaceId as is because wayland aggressively
re-uses object ids so kwin can associate wrong surface with x11 window.
To prevent that, this change also makes Toplevel::setSurface() reset
cached surface id.
CCBUG: 442936
CCBUG: 426069
It's not necessary, the placeholder output already gets created in DrmBackend::removeOutput
if necessary. More improtantly it's missing the check for shutdown, which
may cause issues if the computer is turned off while no outputs are connected.
clientArea() was changed to forbid "-1" screen ids, but it seems like
the thumbnail aside effect can pass it to refer to the active screen.
This change makes the thumbnail aside effect handle "-1" screen id case
explicitly. It will be also useful for EffectScreen transition.
BUG: 443166
If the virtual desktops rule is created, only the last virtual desktop
the window is on is going to be checked.
With this, all virtual desktops that the window is currently on will be
checked.
Technically, it's an api breaking change, but the window rules kcm is
the primary user of queryWindowInfo() so I don't think it's a big deal.
KPluginMetaData::findPlugins only returns valid json metdata, the previous
check was accidentally kept for the condition that the plugin provides a theme engine.
BUG: 442978
FIXED-IN: master
Blobs are not reference counted if used by other drm master, if kwin
re-uses a deleted blob in an atomic commit, it will fail. For example,
on my computer, this happens when kwin starts after xorg.
Besides that, kwin may try to destroy blobs that it doesn't own, which
is not fatal but it's strange to do so.
CCBUG: 442603
CCBUG: 439873
While findWorkingCombination should never fail, in the case it does
KWin should not crash. To achieve that simply restore the old config
in case of failure.
CCBUG: 439873
When libinput tears down, it may access the Session object. This change
re-jitters the shut down logic so the Session object is guaranteed to be
valid when libinput stuff gets destroyed.
BUG: 442104
ksmserver provides the backing window (the hidden black one) for the
lockscreen. We don't want to animate this fading out.
It no longer provides the logout prompt since several plasma releases.
DrmGpu::updateOutputs is now changing the state of some drm properties
without changing the fitting output state (namely RenderLoop inhibition)
which can lead to rendering being inhibited indefinitely in some cases
Software-based clipping is naive. It maps the clip region from the
global screen coordinates and intersects it with window quads. If the
window is transformed, the quads won't be clipped as expected.
Unfortunately, the OpenGL scene enables software-based geometry clipping
if the screen transformed. It's not clear why it does so, perhaps as a
performance optimization? Either way, this produces incorrect results
when the screen is scaled.
BUG: 440940
This makes ExpoLayout easier to maintain. As is, the main issue with it
is the number of layout algorithms.
With this, the ExpoLayout is going to have two layout algorithms - one is
very simple and the other not so.
Startup code in plasmashell was changed so xsetroot is not called
anymore, which is sort of fine.
Unfortunately (or not?), it exposed a bug in kwin. Cursor::x11Cursor()
only works in the standalone X11 session.
On Wayland, Cursor::x11Cursor() will return XCB_NONE which results in
seeing cross cursor when there should be arrow cursor.
This change moves xcb_cursor_t look up code from X11Cursor to the base
Cursor class. In hindsight, I would like to introduce a window manager
class where the xcb cursor and other x11 specific code can be moved in
the future for better encapsulation of platform-specific code.
CCBUG: 442539
For some reason, layers are change after applying Show Desktop effect, so
we will have AboveLayer for our popups and Desktop, and NotificationLayer
for Dock which hides us.
Also, OSD and critical notifications were always hidden by our popups.
This patch solves both the issues.
Usual notifications will still be hidden, but hopefully it's not a big
issue.
BUG: 442605
reinterpret_cast<>() will fail if the types we cast from and to have
mismatching sizes.
Unfortunately, there are platforms that have Window and
EGLNativeWindowType of different size. This results in compilation
errors.
In order to work around those problematic platforms, this change
replaces reinterpret_cast cast with a c style cast.
EffectQuickView is used by Aurorae. As long as Aurorae decorations are
rendered by kwin, it's not a problem. However, kde-gtk-config kded
module can also render them. This creates a problem. If effects object
is not created, accessing any of its getters or setters will result in a
segmentation fault.
This change rewrites the share context check so the effects object is
not accessed anymore.
One could argue that kde-gtk-config has to provide a dummy EffectsHandler
but it doesn't use effects and libkwineffects is not a dependency of
KDecoration2. So, providing a dummy EffectsHandler makes no sense.
In hindsight, we need to revisit the usage of EffectQuickView in Aurorae
as accessing the EffectsHandler in EffectQuickView is a totally valid
usecase and integration of QOpenGLContext.
BUG: 441585
When running in plasma, the animation speed slider is in General
Behavior KCM.
The Defaults button should not reset the animation speed slider because
it's hidden.
BUG: 442600
With per-screen rendering, the projection matrix is no longer created
with the workspace geometry, i.e. all screen geometries united, so the
center of the workspace geometry may not map to (0, 0) in the clip
coordinates.
GLRenderTarget::virtualScreenGeometry() can be used to query the rect
that was used to create the projection matrix.
BUG: 442770
KMS can only ever have one frame pending at the moment. If we
update the outputs while a pageflip is still pending on any output
the atomic commit will fail with EBUSY, which both invalidates
the testing for output configuration and makes applying the wanted
configuration fail.
This can be removed again once KMS gains the ability to do mailbox
presentation; that will likely still take a while though.
BUG: 442677