From c76301e43a0e124a389b8f79b2c3a14903599330 Mon Sep 17 00:00:00 2001 From: Airyzz <36567925+Airyzz@users.noreply.github.com> Date: Thu, 12 Feb 2026 19:46:44 +1030 Subject: [PATCH 1/2] webview test --- .../developer/developer_settings_page.dart | 28 +++++++++++++++++++ commet/linux/my_application.cc | 1 - commet/pubspec.yaml | 6 +++- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/commet/lib/ui/pages/settings/categories/developer/developer_settings_page.dart b/commet/lib/ui/pages/settings/categories/developer/developer_settings_page.dart index 5cf786d92..06e42ca64 100644 --- a/commet/lib/ui/pages/settings/categories/developer/developer_settings_page.dart +++ b/commet/lib/ui/pages/settings/categories/developer/developer_settings_page.dart @@ -6,12 +6,14 @@ import 'package:commet/config/build_config.dart'; import 'package:commet/config/platform_utils.dart'; import 'package:commet/diagnostic/diagnostics.dart'; import 'package:commet/main.dart'; +import 'package:commet/ui/navigation/adaptive_dialog.dart'; import 'package:commet/ui/navigation/navigation_utils.dart'; import 'package:commet/ui/pages/developer/benchmarks/timeline_viewer_benchmark.dart'; import 'package:commet/ui/pages/settings/categories/app/general_settings_page.dart'; import 'package:commet/ui/pages/settings/categories/developer/cumulative_diagnostics_widget.dart'; import 'package:commet/utils/background_tasks/background_task_manager.dart'; import 'package:commet/utils/background_tasks/mock_tasks.dart'; +import 'package:desktop_webview_window/desktop_webview_window.dart'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; @@ -37,6 +39,7 @@ class _DeveloperSettingsPageState extends State { windowSize(), notificationTests(), rendering(), + webView(), error(), if (PlatformUtils.isAndroid) shortcuts(), backgroundTasks(), @@ -295,6 +298,31 @@ class _DeveloperSettingsPageState extends State { ); } + Widget webView() { + return ExpansionTile( + title: const tiamat.Text.labelEmphasised("WebView"), + backgroundColor: Theme.of(context).colorScheme.surfaceContainerLow, + collapsedBackgroundColor: + Theme.of(context).colorScheme.surfaceContainerLow, + children: [ + Wrap(spacing: 8, runSpacing: 8, children: [ + tiamat.Button( + text: "Open Webview", + onTap: () async { + var url = await AdaptiveDialog.textPrompt(context); + if (url == null) return; + + var view = await WebviewWindow.create( + configuration: + CreateConfiguration(title: "Commet - Webview")); + view.launch(url); + view.openDevToolsWindow(); + }), + ]) + ], + ); + } + Widget error() { return ExpansionTile( title: const tiamat.Text.labelEmphasised("Error"), diff --git a/commet/linux/my_application.cc b/commet/linux/my_application.cc index 4012e1cd1..755c5bf37 100644 --- a/commet/linux/my_application.cc +++ b/commet/linux/my_application.cc @@ -43,7 +43,6 @@ static void my_application_activate(GApplication* application) { gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); fl_register_plugins(FL_PLUGIN_REGISTRY(view)); - gtk_widget_hide(GTK_WIDGET(window)); gtk_widget_grab_focus(GTK_WIDGET(view)); } diff --git a/commet/pubspec.yaml b/commet/pubspec.yaml index 404df70d4..93ef69606 100644 --- a/commet/pubspec.yaml +++ b/commet/pubspec.yaml @@ -100,7 +100,11 @@ dependencies: vodozemac: ^0.2.0 intl_translation: ^0.20.1 - + desktop_webview_window: + git: + url: https://github.com/commetchat/mixin-flutter-plugins.git + ref: webview-patch + path: ./packages/desktop_webview_window ## ---- Putting some extra lines in here to help git with the diff ## ---- Probably good to keep this stuff at the bottom of the list ## Begin Google Services Dependencies From 1c54c87b42fcfac0cce04c811e9ef7548eae667f Mon Sep 17 00:00:00 2001 From: Airyzz <36567925+Airyzz@users.noreply.github.com> Date: Wed, 25 Feb 2026 21:09:28 +1030 Subject: [PATCH 2/2] disable explicit sync on nvidia cards --- commet/linux/my_application.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commet/linux/my_application.cc b/commet/linux/my_application.cc index 755c5bf37..3f852a266 100644 --- a/commet/linux/my_application.cc +++ b/commet/linux/my_application.cc @@ -89,7 +89,8 @@ MyApplication* my_application_new() { // the application to be recognized beyond its binary name. g_set_prgname(APPLICATION_ID); - + // https://github.com/commetchat/commet/issues/640 + setenv("__NV_DISABLE_EXPLICIT_SYNC", "1", 1); return MY_APPLICATION(g_object_new(my_application_get_type(), "application-id", APPLICATION_ID,