From ef90ae21044a726dc0ea9d38e96f50be68db3ea5 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 11 Dec 2022 03:18:30 +0100 Subject: [PATCH] Linux: fix getOpacity() (#255) --- linux/window_manager_plugin.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/window_manager_plugin.cc b/linux/window_manager_plugin.cc index 202829e..d80654c 100644 --- a/linux/window_manager_plugin.cc +++ b/linux/window_manager_plugin.cc @@ -454,7 +454,8 @@ static FlMethodResponse* set_icon(WindowManagerPlugin* self, FlValue* args) { } static FlMethodResponse* get_opacity(WindowManagerPlugin* self) { - g_autoptr(FlValue) result = fl_value_new_float(1); + gdouble opacity = gtk_widget_get_opacity(GTK_WIDGET(get_window(self))); + g_autoptr(FlValue) result = fl_value_new_float(opacity); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); }