From 55559d91db9d583f334c3acf8f636cfdb0822892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Thu, 1 Apr 2021 15:01:17 +0200 Subject: [PATCH] window: Don't unhibit with 0 cookie The upper layers do not bother whether there's an inhibitor when calling uninhibit (and shouldn't) so don't put out out warning when called with 0 cookie. Closes: #249 --- src/calls-call-window.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calls-call-window.c b/src/calls-call-window.c index 7de8814..d33ce7a 100644 --- a/src/calls-call-window.c +++ b/src/calls-call-window.c @@ -180,8 +180,9 @@ session_inhibit (CallsCallWindow *self, gboolean inhibit) } else { - gtk_application_uninhibit (gtk_window_get_application (GTK_WINDOW (self)), - self->inhibit_cookie); + if (self->inhibit_cookie != 0) + gtk_application_uninhibit (gtk_window_get_application (GTK_WINDOW (self)), + self->inhibit_cookie); self->inhibit_cookie = 0; }