Skip to content

Commit

Permalink
Linux: fix getOpacity() (leanflutter#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnurmi authored and obiwanzenobi committed May 25, 2023
1 parent ba1d3c6 commit ef90ae2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion linux/window_manager_plugin.cc
Expand Up @@ -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));
}

Expand Down

0 comments on commit ef90ae2

Please sign in to comment.