mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
gdksurface-wayland: Fix contradictory assert
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.
This commit is contained in:
parent
3bfaaab4f7
commit
55016ada92
@ -2293,8 +2293,7 @@ gdk_wayland_toplevel_inhibit_idle (GdkToplevel *toplevel)
|
||||
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user