[wayland] avoid potential crash when checking for window inhibitions on desktop change
Summary: 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 somewhere. BUG: 420039 Test Plan: None Reviewers: #kwin, apol Reviewed By: apol Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D28858
This commit is contained in:
parent
bee3afdd51
commit
d0875aa117
1 changed files with 1 additions and 1 deletions
|
@ -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()) {
|
||||
inhibit(client);
|
||||
} else {
|
||||
uninhibit(client);
|
||||
|
|
Loading…
Reference in a new issue