[gnome-remote-desktop] session: Add method to notify subclasses when session is started
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] session: Add method to notify subclasses when session is started
- Date: Tue, 15 Feb 2022 10:08:10 +0000 (UTC)
commit 86e216d394b7396c244d19474a2140bc743fe34b
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Wed Nov 24 11:12:51 2021 +0100
session: Add method to notify subclasses when session is started
Add a member function for grd-session, which will be called, when the
remote desktop session is started.
This allows subclass implementations to call necessary initialization
methods, that depend on the remote desktop session being started.
src/grd-session.c | 5 +++++
src/grd-session.h | 1 +
2 files changed, 6 insertions(+)
---
diff --git a/src/grd-session.c b/src/grd-session.c
index b5e6240f..41f72a02 100644
--- a/src/grd-session.c
+++ b/src/grd-session.c
@@ -449,6 +449,7 @@ on_session_start_finished (GObject *object,
GrdDBusRemoteDesktopSession *proxy;
GrdSession *session;
GrdSessionPrivate *priv;
+ GrdSessionClass *klass;
g_autoptr (GError) error = NULL;
proxy = GRD_DBUS_REMOTE_DESKTOP_SESSION (object);
@@ -466,8 +467,12 @@ on_session_start_finished (GObject *object,
session = GRD_SESSION (user_data);
priv = grd_session_get_instance_private (session);
+ klass = GRD_SESSION_GET_CLASS (session);
priv->started = TRUE;
+
+ if (klass->remote_desktop_session_started)
+ klass->remote_desktop_session_started (session);
}
static void
diff --git a/src/grd-session.h b/src/grd-session.h
index d9f96e21..f0cdc2f1 100644
--- a/src/grd-session.h
+++ b/src/grd-session.h
@@ -64,6 +64,7 @@ struct _GrdSessionClass
GObjectClass parent_class;
void (*remote_desktop_session_ready) (GrdSession *session);
+ void (*remote_desktop_session_started) (GrdSession *session);
void (*stream_ready) (GrdSession *session,
GrdStream *stream);
void (*stop) (GrdSession *session);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]