mirror of
https://github.com/haorendashu/nowser.git
synced 2025-12-17 09:54:19 +01:00
try to add linux webview support
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#endif
|
||||
|
||||
#include "flutter/generated_plugin_registrant.h"
|
||||
#include <webview_cef/webview_cef_plugin.h>
|
||||
|
||||
struct _MyApplication {
|
||||
GtkApplication parent_instance;
|
||||
@@ -54,6 +55,8 @@ static void my_application_activate(GApplication* application) {
|
||||
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
|
||||
|
||||
FlView* view = fl_view_new(project);
|
||||
g_signal_connect(view, "key_press_event", G_CALLBACK(processKeyEventForCEF), nullptr);
|
||||
g_signal_connect(view, "key_release_event", G_CALLBACK(processKeyEventForCEF), nullptr);
|
||||
gtk_widget_show(GTK_WIDGET(view));
|
||||
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user