application: Prevent a warning

When we've handled a inhibit idle request via Wayland, there is
no need to call into the D-Bus inhibit api unless there's other
inhibit flags to handle.

Fixes: #6470
This commit is contained in:
Matthias Clasen 2024-02-25 08:21:05 -05:00
parent 0d3265edc7
commit dd7a0cbeb7

View File

@ -146,7 +146,8 @@ gtk_application_impl_wayland_inhibit (GtkApplicationImpl *impl,
}
}
inhibitor->dbus_cookie = ((GtkApplicationImplWaylandClass *) G_OBJECT_GET_CLASS (wayland))->dbus_inhibit (impl, window, flags, reason);
if (flags)
inhibitor->dbus_cookie = ((GtkApplicationImplWaylandClass *) G_OBJECT_GET_CLASS (wayland))->dbus_inhibit (impl, window, flags, reason);
return inhibitor->cookie;
}