From 886dad97c5e7f0b29f42bcf65ae6af4afb412d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Tue, 23 Feb 2021 12:37:33 +0100 Subject: [PATCH] WebApp: get active window prop only once --- src/appRemote.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/appRemote.js b/src/appRemote.js index 7ce79724..c6e12bc1 100644 --- a/src/appRemote.js +++ b/src/appRemote.js @@ -10,12 +10,14 @@ class ClapperAppRemote extends AppBase { super.vfunc_startup(); + const window = this.active_window; + const clapperWidget = new WidgetRemote(); - this.active_window.set_child(clapperWidget); + window.set_child(clapperWidget); const headerBar = new HeaderBarRemote(); - this.active_window.set_titlebar(headerBar); + window.set_titlebar(headerBar); - this.active_window.maximize(); + window.maximize(); } });