[gnome-flashback] application: pass input sources to screensaver



commit 2dca2d21976b7c8ef4ed5234d9a8259a5ef7a928
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Feb 8 18:26:02 2020 +0200

    application: pass input sources to screensaver

 gnome-flashback/gf-application.c                | 8 +++++++-
 gnome-flashback/libscreensaver/Makefile.am      | 3 +++
 gnome-flashback/libscreensaver/gf-screensaver.c | 8 +++++++-
 gnome-flashback/libscreensaver/gf-screensaver.h | 8 ++++++--
 4 files changed, 23 insertions(+), 4 deletions(-)
---
diff --git a/gnome-flashback/gf-application.c b/gnome-flashback/gf-application.c
index df94ad6..0d8f428 100644
--- a/gnome-flashback/gf-application.c
+++ b/gnome-flashback/gf-application.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014-2019 Alberts Muktupāvels
+ * Copyright (C) 2014-2020 Alberts Muktupāvels
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -235,6 +235,12 @@ settings_changed (GSettings   *settings,
     gf_input_settings_set_monitor_manager (application->input_settings,
                                            monitor_manager);
 
+  if (application->screensaver)
+    {
+      gf_screensaver_set_input_sources (application->screensaver,
+                                        application->input_sources);
+    }
+
   if (application->shell)
     flashback_shell_set_monitor_manager (application->shell, monitor_manager);
 }
diff --git a/gnome-flashback/libscreensaver/Makefile.am b/gnome-flashback/libscreensaver/Makefile.am
index 1c177c0..28ada70 100644
--- a/gnome-flashback/libscreensaver/Makefile.am
+++ b/gnome-flashback/libscreensaver/Makefile.am
@@ -8,8 +8,10 @@ libscreensaver_la_CPPFLAGS = \
        -DG_LOG_DOMAIN=\"screensaver\" \
        -DG_LOG_USE_STRUCTURED=1 \
        -DGNOME_DESKTOP_USE_UNSTABLE_API \
+       -I$(top_builddir)/gnome-flashback/libinput-sources \
        -I$(top_builddir)/gnome-flashback/libscreensaver \
        -I$(top_srcdir) \
+       -I$(top_srcdir)/gnome-flashback \
        $(AM_CPPFLAGS) \
        $(NULL)
 
@@ -50,6 +52,7 @@ libscreensaver_la_LDFLAGS = \
 
 libscreensaver_la_LIBADD = \
        $(top_builddir)/dbus/libdbus.la \
+       $(top_builddir)/gnome-flashback/libinput-sources/libinput-sources.la \
        $(SCREENSAVER_LIBS) \
        $(NULL)
 
diff --git a/gnome-flashback/libscreensaver/gf-screensaver.c b/gnome-flashback/libscreensaver/gf-screensaver.c
index 672384c..9494b46 100644
--- a/gnome-flashback/libscreensaver/gf-screensaver.c
+++ b/gnome-flashback/libscreensaver/gf-screensaver.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Alberts Muktupāvels
+ * Copyright (C) 2016-2020 Alberts Muktupāvels
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -41,3 +41,9 @@ gf_screensaver_new (void)
 {
   return g_object_new (GF_TYPE_SCREENSAVER, NULL);
 }
+
+void
+gf_screensaver_set_input_sources (GfScreensaver  *self,
+                                  GfInputSources *input_sources)
+{
+}
diff --git a/gnome-flashback/libscreensaver/gf-screensaver.h b/gnome-flashback/libscreensaver/gf-screensaver.h
index b9899f6..b7303e4 100644
--- a/gnome-flashback/libscreensaver/gf-screensaver.h
+++ b/gnome-flashback/libscreensaver/gf-screensaver.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Alberts Muktupāvels
+ * Copyright (C) 2016-2020 Alberts Muktupāvels
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,13 +19,17 @@
 #define GF_SCREENSAVER_H
 
 #include <glib-object.h>
+#include <libinput-sources/gf-input-sources.h>
 
 G_BEGIN_DECLS
 
 #define GF_TYPE_SCREENSAVER gf_screensaver_get_type ()
 G_DECLARE_FINAL_TYPE (GfScreensaver, gf_screensaver, GF, SCREENSAVER, GObject)
 
-GfScreensaver *gf_screensaver_new (void);
+GfScreensaver *gf_screensaver_new               (void);
+
+void           gf_screensaver_set_input_sources (GfScreensaver  *self,
+                                                 GfInputSources *input_sources);
 
 G_END_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]