Commit d0875aa1 authored by David Edmundson's avatar David Edmundson
Browse files

[wayland] avoid potential crash when checking for window inhibitions on desktop change

Xwayland clients are sometimes offset from being visible to having a
surface applied.

We might also have internal windows which will be AbstractClients
without a surface.

No idle interface will be set up for non wayland clients, but on a
desktop change we itterate through all AbstractClients and need to guard

BUG: 420039

Test Plan: None

Reviewers: #kwin, apol

Reviewed By: apol

Subscribers: kwin

Tags: #kwin

Differential Revision:
parent bee3afdd
......@@ -101,7 +101,7 @@ void IdleInhibition::update(AbstractClient *client)
// TODO: Don't honor the idle inhibitor object if the shell client is not
// on the current activity (currently, activities are not supported).
const bool visible = client->isShown(true) && client->isOnCurrentDesktop();
if (visible && client->surface()->inhibitsIdle()) {
if (visible && client->surface() && client->surface()->inhibitsIdle()) {
} else {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment