gdk_wayland_toplevel_inhibit_idle() contained a contradictory assert
that always fail. More specifically, in the branch that is supposed to
create the idle inhibitor, there is an assertion that it must already
exist and that the refcount must be greater than zero. This causes a
crash on WMs/DEs that use the ZWP idle inhibit manager protocol such as
KDE Plasma and Sway. Fix this by just asserting that the refcount is
zero instead.
if (!wayland_toplevel->idle_inhibitor)
{
- g_assert (wayland_toplevel->idle_inhibitor &&
- wayland_toplevel->idle_inhibitor_refcount > 0);
+ g_assert (wayland_toplevel->idle_inhibitor_refcount == 0);
wayland_toplevel->idle_inhibitor =
zwp_idle_inhibit_manager_v1_create_inhibitor (display_wayland->idle_inhibit_manager,