Added Gnome Calls
This commit is contained in:
63
net-voip/gnome-calls/files/inhibit-suspend-during-call.patch
Normal file
63
net-voip/gnome-calls/files/inhibit-suspend-during-call.patch
Normal file
@@ -0,0 +1,63 @@
|
||||
From 9619ebb674771206662f099901c617edb54b870a Mon Sep 17 00:00:00 2001
|
||||
From: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu>
|
||||
Date: Thu, 6 Aug 2020 22:28:37 +0200
|
||||
Subject: [PATCH] src/calls-call-window.c: Inhibit suspend during active call
|
||||
|
||||
---
|
||||
src/calls-call-window.c | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/src/calls-call-window.c b/src/calls-call-window.c
|
||||
index 312a892..d6c5d8a 100644
|
||||
--- a/src/calls-call-window.c
|
||||
+++ b/src/calls-call-window.c
|
||||
@@ -60,6 +60,8 @@ struct _CallsCallWindow
|
||||
GtkStack *call_stack;
|
||||
GtkFlowBox *call_selector;
|
||||
|
||||
+ guint inhibit_cookie;
|
||||
+
|
||||
#ifdef CALLS_WAYLAND
|
||||
gboolean screensaver_active;
|
||||
struct zwlr_layer_shell_v1 *layer_shell_iface;
|
||||
@@ -164,6 +166,28 @@ update_layer_surface (CallsCallWindow *self,
|
||||
#endif // CALLS_WAYLAND
|
||||
|
||||
|
||||
+static void
|
||||
+session_inhibit (CallsCallWindow *self, gboolean inhibit)
|
||||
+{
|
||||
+ if (inhibit)
|
||||
+ {
|
||||
+ if (self->inhibit_cookie == 0)
|
||||
+ self->inhibit_cookie =
|
||||
+ gtk_application_inhibit (gtk_window_get_application (GTK_WINDOW (self)),
|
||||
+ GTK_WINDOW (self),
|
||||
+ GTK_APPLICATION_INHIBIT_SUSPEND,
|
||||
+ "call active");
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ gtk_application_uninhibit (gtk_window_get_application (GTK_WINDOW (self)),
|
||||
+ self->inhibit_cookie);
|
||||
+ self->inhibit_cookie = 0;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+
|
||||
static void
|
||||
update_visibility (CallsCallWindow *self)
|
||||
{
|
||||
@@ -184,6 +208,8 @@ update_visibility (CallsCallWindow *self)
|
||||
{
|
||||
gtk_stack_set_visible_child_name (self->main_stack, "active-call");
|
||||
}
|
||||
+
|
||||
+ session_inhibit (self, !!calls);
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
Reference in New Issue
Block a user