From ad563d16d04e6872c6b7b4b48a7d2e1dea617fc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Fri, 27 Aug 2021 12:56:58 +0200 Subject: [PATCH] Move init functions into main where they should be It seems that libadwaita does not like being initialized too early. Move the init function into the beggining of main() to make it happy. --- src/main.js | 9 ++++----- src/mainRemote.js | 7 +++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main.js b/src/main.js index 7b69def3..ed62309d 100644 --- a/src/main.js +++ b/src/main.js @@ -5,14 +5,13 @@ imports.gi.versions.Soup = '2.4'; pkg.initGettext(); const { GstClapper, Gtk, Adw } = imports.gi; - -GstClapper.Clapper.gst_init(null); -Gtk.init(); -Adw.init(); - const { App } = imports.src.app; function main(argv) { + GstClapper.Clapper.gst_init(null); + Gtk.init(); + Adw.init(); + new App().run(argv); } diff --git a/src/mainRemote.js b/src/mainRemote.js index 7a42bbb9..5d3f4b9a 100644 --- a/src/mainRemote.js +++ b/src/mainRemote.js @@ -5,10 +5,6 @@ imports.gi.versions.Soup = '2.4'; pkg.initGettext(); const { Gtk, Adw } = imports.gi; - -Gtk.init(); -Adw.init(); - const { AppRemote } = imports.src.appRemote; const Misc = imports.src.misc; @@ -19,5 +15,8 @@ Misc.appId += '.' + ID_POSTFIX; function main(argv) { + Gtk.init(); + Adw.init(); + new AppRemote().run(argv); }